interface.d.ts
1.44 KB
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
/// <reference types="react" />
import { TabPaneProps } from './TabPanelList/TabPane';
export declare type TabSizeMap = Map<React.Key, {
width: number;
height: number;
left: number;
top: number;
}>;
export interface TabOffset {
width: number;
height: number;
left: number;
right: number;
top: number;
}
export declare type TabOffsetMap = Map<React.Key, TabOffset>;
export declare type TabPosition = 'left' | 'right' | 'top' | 'bottom';
export interface Tab extends TabPaneProps {
key: string;
node: React.ReactElement;
}
export declare type RenderTabBar = (props: any, DefaultTabBar: React.ComponentType) => React.ReactElement;
export interface TabsLocale {
dropdownAriaLabel?: string;
removeAriaLabel?: string;
addAriaLabel?: string;
}
export interface EditableConfig {
onEdit: (type: 'add' | 'remove', info: {
key?: string;
event: React.MouseEvent | React.KeyboardEvent;
}) => void;
showAdd?: boolean;
removeIcon?: React.ReactNode;
addIcon?: React.ReactNode;
}
export interface AnimatedConfig {
inkBar?: boolean;
tabPane?: boolean;
}
export declare type OnTabScroll = (info: {
direction: 'left' | 'right' | 'top' | 'bottom';
}) => void;
export declare type TabBarExtraPosition = 'left' | 'right';
export declare type TabBarExtraMap = Partial<Record<TabBarExtraPosition, React.ReactNode>>;
export declare type TabBarExtraContent = React.ReactNode | TabBarExtraMap;