-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
/
Copy pathTab.d.ts
85 lines (80 loc) · 2.14 KB
/
Tab.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import * as React from 'react';
import { SxProps } from '@mui/system';
import { Theme } from '..';
import { ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase';
import { OverrideProps } from '../OverridableComponent';
import { TabClasses } from './tabClasses';
export interface TabOwnProps {
/**
* This prop isn't supported.
* Use the `component` prop if you need to change the children structure.
*/
children?: null;
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<TabClasses>;
/**
* If `true`, the component is disabled.
* @default false
*/
disabled?: boolean;
/**
* If `true`, the keyboard focus ripple is disabled.
* @default false
*/
disableFocusRipple?: boolean;
/**
* The icon to display.
*/
icon?: string | React.ReactElement<unknown>;
/**
* The position of the icon relative to the label.
* @default 'top'
*/
iconPosition?: 'top' | 'bottom' | 'start' | 'end';
/**
* The label element.
*/
label?: React.ReactNode;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
/**
* You can provide your own value. Otherwise, we fallback to the child position index.
*/
value?: any;
/**
* Tab labels appear in a single row.
* They can use a second line if needed.
* @default false
*/
wrapped?: boolean;
}
export type TabTypeMap<
AdditionalProps = {},
RootComponent extends React.ElementType = 'div',
> = ExtendButtonBaseTypeMap<{
props: AdditionalProps & TabOwnProps;
defaultComponent: RootComponent;
}>;
/**
*
* Demos:
*
* - [Tabs](https://next.mui.com/material-ui/react-tabs/)
*
* API:
*
* - [Tab API](https://next.mui.com/material-ui/api/tab/)
* - inherits [ButtonBase API](https://next.mui.com/material-ui/api/button-base/)
*/
declare const Tab: ExtendButtonBase<TabTypeMap>;
export type TabProps<
RootComponent extends React.ElementType = TabTypeMap['defaultComponent'],
AdditionalProps = {},
> = OverrideProps<TabTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
component?: React.ElementType;
};
export default Tab;