parent
323d162172
commit
878bafcc85
3 changed files with 40 additions and 25 deletions
@ -0,0 +1,31 @@ |
||||
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; |
@ -0,0 +1,3 @@ |
||||
import OutlinedInputLabel from './OutlinedInputLabel'; |
||||
|
||||
export default OutlinedInputLabel; |
Loading…
Reference in new issue