UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

40 lines (39 loc) 1.33 kB
import { WithSlotMarker } from "../utils/types/Slots.js"; import { FormValidationStatus } from "../utils/types/FormValidationStatus.js"; import React, { InputHTMLAttributes } from "react"; //#region src/Checkbox/Checkbox.d.ts 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; 'data-component'?: string; } & Exclude<InputHTMLAttributes<HTMLInputElement>, 'value'>; /** * An accessible, native checkbox component */ declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & React.RefAttributes<HTMLInputElement>>; declare const _default: WithSlotMarker<typeof Checkbox>; //#endregion export { CheckboxProps, _default as default };