1 | import * as React from 'react';
|
2 | import { SxProps } from '@mui/system';
|
3 | import { Theme } from '..';
|
4 | import { ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase';
|
5 | import { OverrideProps } from '../OverridableComponent';
|
6 | import { TabClasses } from './tabClasses';
|
7 |
|
8 | export interface TabOwnProps {
|
9 | |
10 |
|
11 |
|
12 |
|
13 | children?: null;
|
14 | |
15 |
|
16 |
|
17 | classes?: Partial<TabClasses>;
|
18 | |
19 |
|
20 |
|
21 |
|
22 | disabled?: boolean;
|
23 | |
24 |
|
25 |
|
26 |
|
27 | disableFocusRipple?: boolean;
|
28 | |
29 |
|
30 |
|
31 | icon?: string | React.ReactElement<unknown>;
|
32 | |
33 |
|
34 |
|
35 |
|
36 | iconPosition?: 'top' | 'bottom' | 'start' | 'end';
|
37 | |
38 |
|
39 |
|
40 | label?: React.ReactNode;
|
41 | |
42 |
|
43 |
|
44 | sx?: SxProps<Theme>;
|
45 | |
46 |
|
47 |
|
48 | value?: any;
|
49 | |
50 |
|
51 |
|
52 |
|
53 |
|
54 | wrapped?: boolean;
|
55 | }
|
56 |
|
57 | export type TabTypeMap<
|
58 | AdditionalProps = {},
|
59 | RootComponent extends React.ElementType = 'div',
|
60 | > = ExtendButtonBaseTypeMap<{
|
61 | props: AdditionalProps & TabOwnProps;
|
62 | defaultComponent: RootComponent;
|
63 | }>;
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 | declare const Tab: ExtendButtonBase<TabTypeMap>;
|
77 |
|
78 | export type TabProps<
|
79 | RootComponent extends React.ElementType = TabTypeMap['defaultComponent'],
|
80 | AdditionalProps = {},
|
81 | > = OverrideProps<TabTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
82 | component?: React.ElementType;
|
83 | };
|
84 |
|
85 | export default Tab;
|