-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
/
Tabs.d.ts
47 lines (41 loc) · 1.34 KB
/
Tabs.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
import * as React from 'react';
import ButtonBase from '../ButtonBase/ButtonBase';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
export interface TabsTypeMap<P = {}, D extends React.ElementType = typeof ButtonBase> {
props: P & {
action?: React.Ref<TabsActions>;
centered?: boolean;
children?: React.ReactNode;
indicatorColor?: 'secondary' | 'primary' | string;
onChange?: (event: React.ChangeEvent<{}>, value: any) => void;
orientation?: 'horizontal' | 'vertical';
ScrollButtonComponent?: React.ElementType;
scrollButtons?: 'auto' | 'desktop' | 'on' | 'off';
TabIndicatorProps?: Partial<React.HTMLAttributes<HTMLDivElement>>;
textColor?: 'secondary' | 'primary' | 'inherit' | string;
value: any;
variant?: 'standard' | 'scrollable' | 'fullWidth';
width?: string;
};
defaultComponent: D;
classKey: TabsClassKey;
}
declare const Tabs: OverridableComponent<TabsTypeMap>;
export type TabsClassKey =
| 'root'
| 'flexContainer'
| 'scroller'
| 'fixed'
| 'scrollable'
| 'centered'
| 'scrollButtons'
| 'scrollButtonsDesktop'
| 'indicator';
export interface TabsActions {
updateIndicator(): void;
}
export type TabsProps<
D extends React.ElementType = TabsTypeMap['defaultComponent'],
P = {}
> = OverrideProps<TabsTypeMap<P, D>, D>;
export default Tabs;