UNPKG

1.48 kBTypeScriptView Raw
1/// <reference types="react" />
2import type { TabPaneProps } from './TabPanelList/TabPane';
3export declare type TabSizeMap = Map<React.Key, {
4 width: number;
5 height: number;
6 left: number;
7 top: number;
8}>;
9export interface TabOffset {
10 width: number;
11 height: number;
12 left: number;
13 right: number;
14 top: number;
15}
16export declare type TabOffsetMap = Map<React.Key, TabOffset>;
17export declare type TabPosition = 'left' | 'right' | 'top' | 'bottom';
18export interface Tab extends TabPaneProps {
19 key: string;
20 node: React.ReactElement;
21}
22export declare type RenderTabBar = (props: any, DefaultTabBar: React.ComponentType) => React.ReactElement;
23export interface TabsLocale {
24 dropdownAriaLabel?: string;
25 removeAriaLabel?: string;
26 addAriaLabel?: string;
27}
28export interface EditableConfig {
29 onEdit: (type: 'add' | 'remove', info: {
30 key?: string;
31 event: React.MouseEvent | React.KeyboardEvent;
32 }) => void;
33 showAdd?: boolean;
34 removeIcon?: React.ReactNode;
35 addIcon?: React.ReactNode;
36}
37export interface AnimatedConfig {
38 inkBar?: boolean;
39 tabPane?: boolean;
40}
41export declare type OnTabScroll = (info: {
42 direction: 'left' | 'right' | 'top' | 'bottom';
43}) => void;
44export declare type TabBarExtraPosition = 'left' | 'right';
45export declare type TabBarExtraMap = Partial<Record<TabBarExtraPosition, React.ReactNode>>;
46export declare type TabBarExtraContent = React.ReactNode | TabBarExtraMap;