@ucloud-pccl/react-components
Version:
UCloud pccl react components
32 lines (31 loc) • 1.3 kB
TypeScript
import React, { ReactElement, ReactNode } from 'react';
import { TabPaneProps } from './Pane';
import { TabBarPosition, Size, StyleType } from './shared';
export interface TabsProps {
/** 当前激活的 tab key,受控 */
activeKey?: string;
/** 默认激活的 tab key,非受控 */
defaultActiveKey?: string;
/** tab 修改时的回调 */
onChange?: (activeKey: string) => void;
/** 是否销毁不展示的 tab 内容 */
destroyInactiveTabPane?: boolean;
/** panes */
children: ReactElement<TabPaneProps>[] | ReactNode;
/** @ignore */
className?: string;
/** bar 的定位 */
tabBarPosition?: TabBarPosition;
/** @ignore */
direction?: string;
/** 样式风格 */
styleType?: StyleType;
/** 尺寸 */
size?: Size;
/** Tabbar 自定义className */
tabBarClassName?: string;
/**支持删除按钮:传入处理删除函数,就展示 */
handlePaneDelete?: (activeKey: string) => void;
}
declare const _default: React.MemoExoticComponent<({ activeKey: _activeKey, defaultActiveKey, onChange: _onChange, destroyInactiveTabPane, children, className, tabBarPosition, direction, styleType, size, tabBarClassName, handlePaneDelete, ...restProps }: TabsProps) => React.JSX.Element>;
export default _default;