// form import { useFormContext, Controller } from 'react-hook-form'; // @mui import { Switch, FormControlLabel, FormControlLabelProps } from '@mui/material'; // ---------------------------------------------------------------------- type IProps = Omit; interface Props extends IProps { name: string; } export default function RHFSwitch({ name, ...other }: Props) { const { control } = useFormContext(); return ( } /> } {...other} /> ); }