Debian Codegraph @

node/@patternfly/react-core/dist/esm/components/Checkbox/Checkbox.d.ts

raw
1 import { Component } from 'react';
2 import { PickOptional } from '../../helpers/typeUtils';
3 import { OUIAProps } from '../../helpers';
4 export interface CheckboxProps extends Omit<React.HTMLProps<HTMLInputElement>, 'type' | 'onChange' | 'disabled' | 'label'>, OUIAProps {
5 /** Additional classes added to the checkbox wrapper. This wrapper will be div element by default. It will be a label element if
6 * isLabelWrapped is true, or it can be overridden by any element specified in the component prop.
7 */
8 className?: string;
9 /** Additional classes added to the checkbox input. */
10 inputClassName?: string;
11 /** Flag to indicate whether the checkbox wrapper element is a <label> element for the checkbox input. Will not apply if a component prop (with a value other than a "label") is specified. */
12 isLabelWrapped?: boolean;
13 /** Flag to show if the checkbox selection is valid or invalid. */
14 isValid?: boolean;
15 /** Flag to show if the checkbox is disabled. */
16 isDisabled?: boolean;
17 /** Flag to show if the checkbox is required. */
18 isRequired?: boolean;
19 /** Flag to show if the checkbox is checked. If null, the checkbox will be indeterminate (partially checked). */
20 isChecked?: boolean | null;
21 checked?: boolean;
22 /** A callback for when the checkbox selection changes. */
23 onChange?: (event: React.FormEvent<HTMLInputElement>, checked: boolean) => void;
24 /** Label text of the checkbox. */
25 label?: React.ReactNode;
26 /** Sets the position of the label. Defaults to 'end' (after the checkbox input). */
27 labelPosition?: 'start' | 'end';
28 /** Id of the checkbox. */
29 id: string;
30 /** Aria-label of the checkbox. */
31 'aria-label'?: string;
32 /** Description text of the checkbox. */
33 description?: React.ReactNode;
34 /** Body text of the checkbox */
35 body?: React.ReactNode;
36 /** Custom aria-describedby value for the checkbox input. If not provided and description is set, a unique ID will be generated automatically. */
37 'aria-describedby'?: string;
38 /** Sets the checkbox wrapper component to render. Defaults to "div". If set to "label", behaves the same as if isLabelWrapped prop was specified. */
39 component?: React.ElementType;
40 /** Value to overwrite the randomly generated data-ouia-component-id.*/
41 ouiaId?: number | string;
42 /** Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false. */
43 ouiaSafe?: boolean;
44 }
45 declare class Checkbox extends Component<CheckboxProps> {
46 static displayName: string;
47 static defaultProps: PickOptional<CheckboxProps>;
48 private handleChange;
49 render(): import("react/jsx-runtime").JSX.Element;
50 }
51 export { Checkbox };
52 //# sourceMappingURL=Checkbox.d.ts.map