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.
32 lines
674 B
32 lines
674 B
3 years ago
|
import {
|
||
|
InputLabel as MUIInputLabel,
|
||
|
inputLabelClasses as muiInputLabelClasses,
|
||
|
InputLabelProps as MUIInputLabelProps,
|
||
|
} from '@mui/material';
|
||
|
|
||
|
import { BLACK, BORDER_RADIUS, GREY } from '../../lib/consts/DEFAULT_THEME';
|
||
|
|
||
|
const OutlinedInputLabel = ({
|
||
|
children,
|
||
|
htmlFor,
|
||
|
}: MUIInputLabelProps): JSX.Element => (
|
||
|
<MUIInputLabel
|
||
|
{...{ htmlFor }}
|
||
|
sx={{
|
||
|
color: GREY,
|
||
|
|
||
|
[`&.${muiInputLabelClasses.focused}`]: {
|
||
|
backgroundColor: GREY,
|
||
|
borderRadius: BORDER_RADIUS,
|
||
|
color: BLACK,
|
||
|
padding: '.1em .6em',
|
||
|
},
|
||
|
}}
|
||
|
variant="outlined"
|
||
|
>
|
||
|
{children}
|
||
|
</MUIInputLabel>
|
||
|
);
|
||
|
|
||
|
export default OutlinedInputLabel;
|