import { FunctionComponent } from 'react' interface SwitchProps { checked: boolean className?: string onChange: (x) => void } const Switch: FunctionComponent = ({ checked = false, className = '', children, onChange, }) => { const handleClick = () => { onChange(!checked) } return (
{children}
) } export default Switch