UNPKG

@lunit/oui

Version:

Lunit Oncology UI components

37 lines (36 loc) 1.19 kB
const MIN_INPUT_HEIGHT = '44px'; /** Tokenized styling for the underlying MUI Autocomplete. */ export const autocompleteSx = (theme, disabled) => ({ '.MuiAutocomplete-inputRoot': { padding: `${theme.spacing(1.5, 3.5)} !important`, gap: theme.spacing(1), '& .MuiInputBase-input::placeholder': { opacity: disabled ? 0.42 : 1, }, '& .MuiAutocomplete-input': { height: '100%', }, }, '.MuiOutlinedInput-root': { minHeight: MIN_INPUT_HEIGHT, }, '.MuiInputBase-root.Mui-disabled': { border: `1px solid ${theme.palette.neutralGrey[70]}`, color: theme.palette.neutralGrey[45], backgroundColor: theme.palette.neutralGrey[75], pointerEvents: 'none', opacity: 0.8, }, '.MuiFormHelperText-root.Mui-error': { ...theme.typography.body5, color: theme.palette.error.main, margin: 0, paddingLeft: theme.spacing(1), }, }); /** Tokenized styling for the listbox paper. */ export const paperSx = (theme) => ({ backgroundColor: theme.palette.neutralGrey[70], borderRadius: theme.spacing(2), backgroundImage: 'none', });