finishing - tuning Diagnosis Exclusion

This commit is contained in:
korospace
2023-10-20 15:40:30 +07:00
parent 8a3b0f3d11
commit a1362b5362
10 changed files with 403 additions and 258 deletions

View File

@@ -21,7 +21,7 @@ export default function ThemeColorPresets({ children }: Props) {
...defaultTheme,
palette: {
...defaultTheme.palette,
primary: setColor,
// primary: setColor,
},
customShadows: {
...defaultTheme.customShadows,

View File

@@ -1,7 +1,8 @@
// form
import { useFormContext, Controller } from 'react-hook-form';
// @mui
import { Checkbox, FormControlLabel, FormGroup, FormControlLabelProps } from '@mui/material';
import { Checkbox, FormControlLabel, FormGroup, FormControlLabelProps, SxProps } from '@mui/material';
import { Theme } from '@mui/system';
// ----------------------------------------------------------------------
@@ -77,9 +78,10 @@ interface optionsCustomInterface {
interface RHFCustomMultiCheckboxProps {
name: string;
options: optionsCustomInterface[];
sx?: SxProps<Theme>
}
export function RHFCustomMultiCheckbox({ name, options, ...other }: RHFCustomMultiCheckboxProps) {
export function RHFCustomMultiCheckbox({ name, options, sx, ...other }: RHFCustomMultiCheckboxProps) {
const { control } = useFormContext();
return (
@@ -93,7 +95,7 @@ export function RHFCustomMultiCheckbox({ name, options, ...other }: RHFCustomMul
: [...field.value, option.value];
return (
<FormGroup>
<FormGroup sx={{ ...sx }}>
{options.map((option, index) => (
<FormControlLabel
key={index}