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