UNPKG

lucid-ui

Version:

A UI component library from AppNexus.

64 lines (63 loc) 2.14 kB
import React from 'react'; import { StandardProps, Overwrite } from '../../util/component-types'; export interface ICheckboxPropsRaw extends StandardProps { /** Indicates whether the component should appear in an "indeterminate" or * "partially checked" state. This prop takes precedence over * \`isSelected\`. */ isIndeterminate: boolean; /** Indicates whether the component should appear and act disabled by having * a "greyed out" palette and ignoring user interactions. */ isDisabled: boolean; /** Indicates that the component is in the "selected" state when true and in * the "unselected" state when false. This props is ignored if * \`isIndeterminate\` is \`true\`. */ isSelected: boolean; /** Called when the user clicks on the component or when they press the space * key while the component is in focus. */ onSelect: (isSelected: boolean, { event, props, }: { event: React.MouseEvent<HTMLInputElement>; props: ICheckboxProps; }) => void; /** A string title that is displayed on hover. */ title?: string; } export declare type ICheckboxProps = Overwrite<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, ICheckboxPropsRaw>; export declare const defaultProps: { isIndeterminate: boolean; isDisabled: boolean; isSelected: boolean; onSelect: (...args: any[]) => void; }; export declare const Checkbox: { (props: ICheckboxProps): React.ReactElement; displayName: string; peek: { description: string; notes: { overview: string; intendedUse: string; technicalRecommendations: string; }; categories: string[]; }; defaultProps: { isIndeterminate: boolean; isDisabled: boolean; isSelected: boolean; onSelect: (...args: any[]) => void; }; propTypes: { className: any; isIndeterminate: any; isDisabled: any; isSelected: any; onSelect: any; style: any; title: any; }; }; export default Checkbox;