import { Switch, type SwitchProps, Tooltip } from '@mantine/core'; import { Controller } from 'react-hook-form'; import type { FormerControllersProps, SpecialIDProps } from '../FormerControllers.types'; const SwitchCtrl = (props: FormerControllersProps & SpecialIDProps & SwitchProps) => { const { control, name, sid, tooltip, ...innerProps } = props; return ( ( { field.onChange((e.currentTarget ?? e.target)?.checked); }} /> )} /> ); }; export { SwitchCtrl }; export default SwitchCtrl;