import React from 'react'; import { clsx } from 'clsx'; export interface CheckboxProps extends Omit, 'type'> { label?: string; description?: string; } const Checkbox = React.forwardRef( ({ className, label, description, ...props }, ref) => { const checkbox = ( ); if (label || description) { return (
{checkbox}
{label && ( )} {description && ( {description} )}
); } return checkbox; } ); Checkbox.displayName = 'Checkbox'; export default Checkbox;