You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
619 B
33 lines
619 B
3 years ago
|
import {
|
||
|
Select as MUISelect,
|
||
|
selectClasses as muiSelectClasses,
|
||
|
SelectProps as MUISelectProps,
|
||
|
} from '@mui/material';
|
||
|
|
||
|
import { GREY } from '../lib/consts/DEFAULT_THEME';
|
||
|
|
||
|
const Select = (selectProps: MUISelectProps): JSX.Element => {
|
||
|
const { children, sx } = selectProps;
|
||
|
const combinedSx = {
|
||
|
[`& .${muiSelectClasses.icon}`]: {
|
||
|
color: GREY,
|
||
|
},
|
||
|
|
||
|
...sx,
|
||
|
};
|
||
|
|
||
|
return (
|
||
|
<MUISelect
|
||
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
||
|
{...{
|
||
|
...selectProps,
|
||
|
sx: combinedSx,
|
||
|
}}
|
||
|
>
|
||
|
{children}
|
||
|
</MUISelect>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default Select;
|