UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

36 lines 1.26 kB
import React, { type InputHTMLAttributes } from 'react'; import { type SxProp } from '../sx'; import type { FormValidationStatus } from '../utils/types/FormValidationStatus'; export type CheckboxProps = { /** * Apply indeterminate visual appearance to the checkbox */ indeterminate?: boolean; /** * Apply inactive visual appearance to the checkbox */ disabled?: boolean; /** * Forward a ref to the underlying input element */ ref?: React.RefObject<HTMLInputElement>; /** * Indicates whether the checkbox must be checked */ required?: boolean; /** * Only used to inform ARIA attributes. Individual checkboxes do not have validation styles. */ validationStatus?: FormValidationStatus; /** * A unique value that is never shown to the user. * Used during form submission and to identify which checkbox inputs are selected */ value?: string; } & Exclude<InputHTMLAttributes<HTMLInputElement>, 'value'> & SxProp; /** * An accessible, native checkbox component */ declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & React.RefAttributes<HTMLInputElement>>; export default Checkbox; //# sourceMappingURL=Checkbox.d.ts.map