import { clsx } from 'clsx'; import Body from '../body/Body'; import CheckboxButton from '../checkboxButton'; import { Typography } from '../common'; export interface CheckboxProps { id?: string; checked?: boolean; required?: boolean; disabled?: boolean; readOnly?: boolean; label: React.ReactNode; secondary?: string; onFocus?: React.FocusEventHandler; onChange: (checked: boolean) => void; onBlur?: React.FocusEventHandler; className?: string; } export default function Checkbox({ id, checked, required, disabled, readOnly, label, className, secondary, onChange, onFocus, onBlur, }: CheckboxProps) { const classList = clsx( 'np-checkbox', { checkbox: true, 'checkbox-lg': secondary, 'checkbox-disabled': disabled, }, className, ); const innerDisabled = disabled || readOnly; return (
); }