style: make select and text input style consistent (#295)
This commit is contained in:
@@ -25,6 +25,11 @@ const useStyles = makeStyles((theme: Theme) =>
|
|||||||
'& fieldset': {
|
'& fieldset': {
|
||||||
border: 0,
|
border: 0,
|
||||||
},
|
},
|
||||||
|
'& .MuiSelect-select': {
|
||||||
|
'&:focus': {
|
||||||
|
background: theme.palette.background.paper,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
option: {
|
option: {
|
||||||
height: '52px',
|
height: '52px',
|
||||||
@@ -48,6 +53,7 @@ export function SwarmSelect({ defaultValue, formik, name, options, onChange, lab
|
|||||||
defaultValue={defaultValue || ''}
|
defaultValue={defaultValue || ''}
|
||||||
className={classes.select}
|
className={classes.select}
|
||||||
placeholder={label}
|
placeholder={label}
|
||||||
|
MenuProps={{ MenuListProps: { disablePadding: true }, PaperProps: { square: true } }}
|
||||||
>
|
>
|
||||||
{options.map((x, i) => (
|
{options.map((x, i) => (
|
||||||
<MenuItem key={i} value={x.value} className={classes.option}>
|
<MenuItem key={i} value={x.value} className={classes.option}>
|
||||||
@@ -71,6 +77,7 @@ export function SwarmSelect({ defaultValue, formik, name, options, onChange, lab
|
|||||||
defaultValue={defaultValue || ''}
|
defaultValue={defaultValue || ''}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
placeholder={label}
|
placeholder={label}
|
||||||
|
MenuProps={{ MenuListProps: { disablePadding: true }, PaperProps: { square: true } }}
|
||||||
>
|
>
|
||||||
{options.map((x, i) => (
|
{options.map((x, i) => (
|
||||||
<MenuItem key={i} value={x.value} className={classes.option}>
|
<MenuItem key={i} value={x.value} className={classes.option}>
|
||||||
|
|||||||
@@ -16,10 +16,18 @@ const useStyles = makeStyles((theme: Theme) =>
|
|||||||
createStyles({
|
createStyles({
|
||||||
field: {
|
field: {
|
||||||
background: theme.palette.background.paper,
|
background: theme.palette.background.paper,
|
||||||
height: '52px',
|
|
||||||
'& fieldset': {
|
'& fieldset': {
|
||||||
border: 0,
|
border: 0,
|
||||||
},
|
},
|
||||||
|
'& .Mui-focused': {
|
||||||
|
background: theme.palette.background.paper,
|
||||||
|
},
|
||||||
|
'& .MuiInputBase-root': {
|
||||||
|
background: theme.palette.background.paper,
|
||||||
|
},
|
||||||
|
'& .MuiFilledInput-root': {
|
||||||
|
borderRadius: 0,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
@@ -36,9 +44,10 @@ export function SwarmTextInput({ name, label, password, optional, formik, onChan
|
|||||||
name={name}
|
name={name}
|
||||||
label={label}
|
label={label}
|
||||||
fullWidth
|
fullWidth
|
||||||
variant="outlined"
|
variant="filled"
|
||||||
className={classes.field}
|
className={classes.field}
|
||||||
defaultValue=""
|
defaultValue=""
|
||||||
|
InputProps={{ disableUnderline: true }}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -49,10 +58,11 @@ export function SwarmTextInput({ name, label, password, optional, formik, onChan
|
|||||||
required
|
required
|
||||||
label={label}
|
label={label}
|
||||||
fullWidth
|
fullWidth
|
||||||
variant="outlined"
|
variant="filled"
|
||||||
className={classes.field}
|
className={classes.field}
|
||||||
defaultValue=""
|
defaultValue=""
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
|
InputProps={{ disableUnderline: true }}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user