import React, { forwardRef, ReactNode } from 'react'; import clsx from 'clsx'; import './checkbox.css'; type Props = { title: string; subtitle?: ReactNode; value: boolean; name?: string; disabled?: boolean; className?: string; error?: string; onChange: (value: boolean) => void; onBlur?: () => void; }; export const Checkbox = forwardRef( ( { title, subtitle, value, name, disabled, error, className = 'checkbox--form', onChange, onBlur, ...rest }, ref, ) => ( <> {error &&
{error}
} ), ); Checkbox.displayName = 'Checkbox';