import * as React from "react"; import { classList, ControlProps, fireClickOnEnter } from "../util"; interface CheckboxProps extends ControlProps { id: string; isChecked: boolean; onChange: (newValue: boolean) => void; label?: string | JSX.Element; style?: "toggle" | "default" tabIndex?: number; } export const Checkbox = (props: CheckboxProps) => { const { id, className, ariaHidden, ariaLabel, role, isChecked, onChange, label, style, tabIndex } = props; const onCheckboxClick = () => { onChange(!isChecked); } return (