add input adornment (token symbol)

This commit is contained in:
mmv 2019-05-21 16:30:20 +04:00
parent 2010a6b7eb
commit d491e25159
3 changed files with 17 additions and 1 deletions

View File

@ -14,7 +14,9 @@ type Props = {
color?: 'soft' | 'medium' | 'dark' | 'white' | 'fancy' | 'primary' | 'secondary' | 'warning' | 'disabled',
}
const GnoButtonLink = ({ type, size, weight, color, ...props }: Props) => (
const GnoButtonLink = ({
type, size, weight, color, ...props
}: Props) => (
<button type={type} className={cx(styles.btnLink, size, color, weight)} {...props} />
)

View File

@ -3,6 +3,7 @@ import * as React from 'react'
import { List } from 'immutable'
import { withStyles } from '@material-ui/core/styles'
import Close from '@material-ui/icons/Close'
import InputAdornment from '@material-ui/core/InputAdornment'
import IconButton from '@material-ui/core/IconButton'
import OpenInNew from '@material-ui/icons/OpenInNew'
import Identicon from '~/components/Identicon'
@ -134,7 +135,10 @@ ETH
</Row>
<GnoForm onSubmit={handleSubmit} formMutators={formMutators}>
{(...args) => {
const formState = args[2]
const mutators = args[3]
const { token } = formState.values
return (
<React.Fragment>
<Row margin="md">
@ -175,6 +179,13 @@ ETH
placeholder="Amount*"
text="Amount*"
className={classes.addressInput}
inputAdornment={token && {
endAdornment: (
<InputAdornment position="end">
{token.symbol}
</InputAdornment>
),
}}
/>
</Col>
</Row>

View File

@ -100,6 +100,9 @@ export default createMuiTheme({
letterSpacing: '-0.5px',
fontSize: mediumFontSize,
},
body2: {
fontFamily: 'Roboto Mono, monospace',
},
},
MuiFormHelperText: {
root: {