import React from 'react'; import cn from 'classnames'; import Flex from './Flex'; import LinkButton from './LinkButton'; export default function ToggleInput({ // visuals name, label, inverseLabel, className, // callbacks onEnter, // state from hook focused, pass, syncPass, visiblyPassed, error, hintError, data, bind, autoFocus, disabled, touched, // ignored initialValue, validators, transformers, ...rest }) { return ( {/* we totally hide the checkbox itself */} {/* and then display a prettier one in its stead */} {bind.checked ? inverseLabel : label} ); }