feat(striker-ui): customize MUI Checkbox

main
Tsu-ba-me 2 years ago
parent 65871e32c7
commit 2247d89451
  1. 29
      striker-ui/components/Checkbox.tsx

@ -0,0 +1,29 @@
import {
Checkbox as MUICheckbox,
checkboxClasses as muiCheckboxClasses,
CheckboxProps as MUICheckboxProps,
} from '@mui/material';
import { FC } from 'react';
import { GREY } from '../lib/consts/DEFAULT_THEME';
type CheckboxProps = MUICheckboxProps;
const Checkbox: FC<CheckboxProps> = ({ sx, ...checkboxProps }) => (
<MUICheckbox
{...{
...checkboxProps,
sx: {
color: GREY,
[`&.${muiCheckboxClasses.checked}`]: { color: GREY },
...sx,
},
}}
/>
);
export type { CheckboxProps };
export default Checkbox;
Loading…
Cancel
Save