X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/3c7e3cdc547ad5468421e1c049daa94b0d4b8bc0..4fc63fca58814fdc6ac21b08fe7b8c2d84e2c3f7:/src/components/select-field/select-field.tsx diff --git a/src/components/select-field/select-field.tsx b/src/components/select-field/select-field.tsx index e4dcad6c10..bea0649632 100644 --- a/src/components/select-field/select-field.tsx +++ b/src/components/select-field/select-field.tsx @@ -11,51 +11,58 @@ type CssRules = 'formControl' | 'selectWrapper' | 'select' | 'option'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ formControl: { - width: '100%' + width: '100%', }, selectWrapper: { backgroundColor: theme.palette.common.white, '&:before': { - borderBottomColor: 'rgba(0, 0, 0, 0.42)' + borderBottomColor: 'rgba(0, 0, 0, 0.42)', }, '&:focus': { - outline: 'none' - } + outline: 'none', + }, }, select: { fontSize: '0.875rem', '&:focus': { - backgroundColor: 'rgba(0, 0, 0, 0.0)' - } + backgroundColor: 'rgba(0, 0, 0, 0.0)', + }, }, option: { fontSize: '0.875rem', backgroundColor: theme.palette.common.white, - height: '30px' - } + height: '30px', + }, }); -export const NativeSelectField = withStyles(styles) - ((props: WrappedFieldProps & WithStyles & { items: any[] }) => - - - - ); +interface NativeSelectFieldProps { + disabled?: boolean; +} + +export const NativeSelectField = withStyles(styles)((props: WrappedFieldProps & NativeSelectFieldProps & WithStyles & { items: any[] }) => ( + + + +)); interface SelectFieldProps { children: React.ReactNode; @@ -66,19 +73,15 @@ type SelectFieldCssRules = 'formControl'; const selectFieldStyles: StyleRulesCallback = (theme: ArvadosTheme) => ({ formControl: { - marginBottom: theme.spacing.unit * 3 + marginBottom: theme.spacing.unit * 3, }, }); -export const SelectField = withStyles(selectFieldStyles)( - (props: WrappedFieldProps & SelectFieldProps & WithStyles) => - - - {props.label} - - - {props.meta.error} - -); \ No newline at end of file +export const SelectField = withStyles(selectFieldStyles)((props: WrappedFieldProps & SelectFieldProps & WithStyles) => ( + + {props.label} + + {props.meta.error} + +));