import { useEffect, useState } from 'react' import Switch from '~components/Switch' import TableField from '~components/TableField' import './index.scss' interface Props { name: string label: string description?: string value?: boolean className?: string imageAlt?: string imageClass?: string imageSrc?: string[] } const SwitchTableField = (props: Props) => { const [value, setValue] = useState(false) useEffect(() => { if (props.value) setValue(props.value) }, [props.value]) function onValueChange(value: boolean) { setValue(value) } return ( ) } export default SwitchTableField