1 | import * as React from 'react';
|
2 | import { StandardProps } from '..';
|
3 | import { IconButtonProps } from '../IconButton';
|
4 |
|
5 | export interface SwitchBaseProps
|
6 | extends StandardProps<
|
7 | IconButtonProps,
|
8 | SwitchBaseClassKey,
|
9 | 'children' | 'onChange' | 'type' | 'value'
|
10 | > {
|
11 | autoFocus?: boolean;
|
12 | |
13 |
|
14 |
|
15 | checked?: boolean;
|
16 | checkedIcon: React.ReactNode;
|
17 | defaultChecked?: boolean;
|
18 | disabled?: boolean;
|
19 | |
20 |
|
21 |
|
22 | disableRipple?: boolean;
|
23 | icon: React.ReactNode;
|
24 | |
25 |
|
26 |
|
27 | id?: string;
|
28 | |
29 |
|
30 |
|
31 | inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
32 | |
33 |
|
34 |
|
35 | inputRef?: React.Ref<any>;
|
36 | |
37 |
|
38 |
|
39 | name?: string;
|
40 | |
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 | onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
|
48 | readOnly?: boolean;
|
49 | |
50 |
|
51 |
|
52 | required?: boolean;
|
53 | tabIndex?: number;
|
54 | type?: React.InputHTMLAttributes<HTMLInputElement>['type'];
|
55 | |
56 |
|
57 |
|
58 | value?: unknown;
|
59 | }
|
60 |
|
61 | export type SwitchBaseClassKey = 'root' | 'checked' | 'disabled' | 'input';
|
62 |
|
63 | declare const SwitchBase: React.ComponentType<SwitchBaseProps>;
|
64 |
|
65 | export default SwitchBase;
|