1 | import * as React from 'react';
|
2 | import { PickOptional } from '../../helpers/typeUtils';
|
3 | export interface ToggleProps {
|
4 |
|
5 | id: string;
|
6 |
|
7 | type?: 'button' | 'submit' | 'reset';
|
8 |
|
9 | children?: React.ReactNode;
|
10 |
|
11 | className?: string;
|
12 |
|
13 | isOpen?: boolean;
|
14 |
|
15 | onToggle?: (isOpen: boolean, event: MouseEvent | TouchEvent | KeyboardEvent | React.KeyboardEvent<any> | React.MouseEvent<HTMLButtonElement>) => void;
|
16 |
|
17 | onEnter?: () => void;
|
18 |
|
19 | parentRef?: any;
|
20 |
|
21 | getMenuRef?: () => HTMLElement;
|
22 |
|
23 | isActive?: boolean;
|
24 |
|
25 | isDisabled?: boolean;
|
26 |
|
27 | isPlain?: boolean;
|
28 |
|
29 | isText?: boolean;
|
30 |
|
31 | isPrimary?: boolean;
|
32 |
|
33 | isSplitButton?: boolean;
|
34 |
|
35 | toggleVariant?: 'primary' | 'secondary' | 'default';
|
36 |
|
37 | 'aria-haspopup'?: boolean | 'listbox' | 'menu' | 'dialog' | 'grid' | 'tree';
|
38 |
|
39 | bubbleEvent?: boolean;
|
40 | }
|
41 | export declare class Toggle extends React.Component<ToggleProps> {
|
42 | static displayName: string;
|
43 | private buttonRef;
|
44 | static defaultProps: PickOptional<ToggleProps>;
|
45 | componentDidMount: () => void;
|
46 | componentWillUnmount: () => void;
|
47 | onDocClick: (event: MouseEvent | TouchEvent) => void;
|
48 | onEscPress: (event: KeyboardEvent) => void;
|
49 | onKeyDown: (event: React.KeyboardEvent<any>) => void;
|
50 | render(): JSX.Element;
|
51 | }
|
52 |
|
\ | No newline at end of file |