import { HelperText, Subheading, Switch, TouchableRipple } from 'react-native-paper' import * as React from 'react' import { View } from 'react-native' import { FieldProps } from 'formik' import { FunctionComponent } from 'react' interface IProps extends FieldProps { label: string id: string } export const InputSwitch: FunctionComponent = (props) => { const { field, label, form, } = props const { touched, errors, setFieldValue, } = form const { name, value, } = field return ( <> setFieldValue(name, !value)}> {label} setFieldValue(name, !value)} /> {errors[name]} ) }