import { forwardRef } from 'react'; import { CheckboxProps } from '@theme/components/types'; import { twMerge } from 'tailwind-merge'; const Checkbox = forwardRef((props, ref) => { // Part styling names the ROW, not the native box: when a caller stamps a // checkbox (see `partAttrs`), the attributes ride the label wrapper so the // whole line — box, text, links, spacing — is restylable, and the input // keeps every other prop it has today. No caller that omits them is // affected: both values are simply undefined and React drops them. const { children, checked = false, error, 'data-part': partName, 'data-state': partState, ...rest } = props as CheckboxProps & { 'data-part'?: string; 'data-state'?: string; }; return ( ); }); Checkbox.displayName = 'Checkbox'; export { Checkbox };