UNPKG

@primer/components

Version:
30 lines (29 loc) 990 B
import React, { InputHTMLAttributes } from 'react'; import { SxProp } from './sx'; export declare 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; /** * Indicates whether the checkbox validation state */ validationStatus?: 'error' | 'success'; } & InputHTMLAttributes<HTMLInputElement> & SxProp; /** * An accessible, native checkbox component */ declare const Checkbox: React.ForwardRefExoticComponent<Pick<CheckboxProps, "sx" | keyof React.InputHTMLAttributes<HTMLInputElement> | "validationStatus" | "indeterminate"> & React.RefAttributes<HTMLInputElement>>; export default Checkbox;