import cx from 'classnames'; import Switch, { ISwitchProps } from '../../switch'; import { IFormComponentProps, IFormFieldChildProps } from '../shared'; import { FormField } from '../Field'; export type IFormSwitchFieldProps = IFormComponentProps< boolean, Omit >; function renderSwitch( childProps: IFormFieldChildProps, props: IFormSwitchFieldProps ) { const { value, ...passedProps } = childProps; return ; } export const FormSwitchField: React.FunctionComponent = props => { const { className, ...rest } = props; return ( {childProps => renderSwitch(childProps, props)} ); };