@ucloud-fe/react-components
Version:
UCloud react components
30 lines (29 loc) • 1.13 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;
/** 头部插槽 */
extra?: ReactNode;
}
declare const _default: React.MemoExoticComponent<({ activeKey: _activeKey, defaultActiveKey, onChange: _onChange, destroyInactiveTabPane, children, className, tabBarPosition, direction, styleType, size, extra, ...restProps }: TabsProps) => JSX.Element>;
export default _default;