Files
Shortumation/webapp/src/components/Inputs/InputBoolean.tsx
T
2022-05-13 17:26:44 -04:00

19 lines
437 B
TypeScript

import "./InputBoolean.css";
import InputWrapper from "./InputWrapper";
export interface Props {
label: string;
value: boolean;
onChange: (v: boolean) => void;
}
export default function InputBoolean({
label,
value = false,
onChange,
}: Props) {
return <div className="input-boolean" onClick={() => onChange(!value)}>
<input type="checkbox" checked={value} onChange={() => { }} />
<label>{label}</label>
</div>
}