@visa/nova-react
Version:
Visa Product Design System Nova React library. Compatible with React ^19.
25 lines (24 loc) • 1.14 kB
TypeScript
import { type ComponentPropsWithRef, type ElementType } from 'react';
export type CheckboxProperties<ET extends ElementType = 'input'> = ({
/** Whether a checkbox is indeterminate state, only allowable on "input" tag types. This should only be set to true if checked is false. */
indeterminate?: never;
/** Tag of Component */
tag: Exclude<ElementType, 'input'>;
} | {
/** Whether a checkbox is indeterminate state, only allowable on "input" tag types. This should only be set to true if checked is false. */
indeterminate?: boolean;
/** Tag of Component */
tag?: 'input';
}) & Omit<ComponentPropsWithRef<ET>, ''>;
/**
* Interactive element enabling users to select one or more independent options from a group.
* @docs {@link https://design.visa.com/components/checkbox/?code_library=react | See Docs}
* @vgar TODO
* @wcag TODO
* @related checkbox-panel
*/
declare const Checkbox: {
<ET extends ElementType = "input">({ className, indeterminate, tag: Tag, ref, ...remainingProps }: CheckboxProperties<ET>): import("react/jsx-runtime").JSX.Element;
displayName: string;
};
export default Checkbox;