| 1 |
import { Component } from 'react'; |
| 2 |
import { PickOptional } from '../../helpers/typeUtils'; |
| 3 |
import { OUIAProps } from '../../helpers'; |
| 4 |
export interface MenuToggleCheckboxProps extends Omit<React.HTMLProps<HTMLInputElement>, 'type' | 'onChange' | 'disabled' | 'checked'>, OUIAProps { |
| 5 |
/** Additional classes added to the MenuToggleCheckbox */ |
| 6 |
className?: string; |
| 7 |
/** Flag to show if the checkbox selection is valid or invalid */ |
| 8 |
isValid?: boolean; |
| 9 |
/** Flag to show if the checkbox is disabled */ |
| 10 |
isDisabled?: boolean; |
| 11 |
/** Flag to show if the checkbox is checked when it is controlled by React state. |
| 12 |
* To make the checkbox uncontrolled instead use the defaultChecked prop, but do not use both. |
| 13 |
*/ |
| 14 |
isChecked?: boolean | null; |
| 15 |
/** Flag to set the default checked value of the checkbox when it is uncontrolled by React state. |
| 16 |
* To make the checkbox controlled instead use the isChecked prop, but do not use both. |
| 17 |
*/ |
| 18 |
defaultChecked?: boolean; |
| 19 |
/** A callback for when the checkbox selection changes */ |
| 20 |
onChange?: (checked: boolean, event: React.FormEvent<HTMLInputElement>) => void; |
| 21 |
/** Element to be rendered inside the <span> */ |
| 22 |
children?: React.ReactNode; |
| 23 |
/** Id of the checkbox */ |
| 24 |
id: string; |
| 25 |
/** Value to overwrite the randomly generated data-ouia-component-id.*/ |
| 26 |
ouiaId?: number | string; |
| 27 |
/** 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. */ |
| 28 |
ouiaSafe?: boolean; |
| 29 |
} |
| 30 |
declare class MenuToggleCheckbox extends Component<MenuToggleCheckboxProps> { |
| 31 |
static displayName: string; |
| 32 |
static defaultProps: PickOptional<MenuToggleCheckboxProps>; |
| 33 |
handleChange: (event: React.FormEvent<HTMLInputElement>) => void; |
| 34 |
calculateChecked: () => boolean; |
| 35 |
render(): import("react/jsx-runtime").JSX.Element; |
| 36 |
} |
| 37 |
export { MenuToggleCheckbox }; |
| 38 |
//# sourceMappingURL=MenuToggleCheckbox.d.ts.map |