1 | import * as React from 'react';
|
2 | import { ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase';
|
3 | import { OverrideProps } from '../OverridableComponent';
|
4 |
|
5 | export type TabTypeMap<P = {}, D extends React.ElementType = 'div'> = ExtendButtonBaseTypeMap<{
|
6 | props: P & {
|
7 | disableFocusRipple?: boolean;
|
8 | fullWidth?: boolean;
|
9 | icon?: string | React.ReactElement;
|
10 | label?: React.ReactNode;
|
11 | onChange?: (event: React.ChangeEvent<{ checked: boolean }>, value: any) => void;
|
12 | onClick?: React.EventHandler<any>;
|
13 | selected?: boolean;
|
14 | style?: React.CSSProperties;
|
15 | textColor?: string | 'secondary' | 'primary' | 'inherit';
|
16 | value?: any;
|
17 | wrapped?: boolean;
|
18 | };
|
19 | defaultComponent: D;
|
20 | classKey: TabClassKey;
|
21 | }>;
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 | declare const Tab: ExtendButtonBase<TabTypeMap>;
|
35 |
|
36 | export type TabClassKey =
|
37 | | 'root'
|
38 | | 'labelIcon'
|
39 | | 'textColorInherit'
|
40 | | 'textColorPrimary'
|
41 | | 'textColorSecondary'
|
42 | | 'selected'
|
43 | | 'disabled'
|
44 | | 'fullWidth'
|
45 | | 'wrapped'
|
46 | | 'wrapper';
|
47 |
|
48 | export type TabProps<
|
49 | D extends React.ElementType = TabTypeMap['defaultComponent'],
|
50 | P = {}
|
51 | > = OverrideProps<TabTypeMap<P, D>, D>;
|
52 |
|
53 | export default Tab;
|