import React from 'react'; interface Props { id: string; label?: string | React.ReactNode; value?: boolean; onClick: (value: boolean) => void; } /** * Toggle input. * * @example * */ export default function ToggleInput({ id, label, value = false, onClick }: Props) { const handleClick = () => { onClick(!value); }; return (
{label ? ( ) : null}
); }