UNPKG

@cainiaofe/cn-ui-m

Version:
35 lines (34 loc) 875 B
/// <reference types="react" /> export interface CnTabItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title' | 'onClick'> { /** * 类型区分 */ type?: 'primary' | 'secondary'; /** * 唯一主键 */ key?: any; /** * 标题展示内容,建议为纯文字 */ title?: React.ReactNode; /** * 内部属性,用于标识上层传递的唯一 key 并用于判断当前 item 是否为激活态 */ itemKey?: any; /** * 放置在选项卡内的内容 */ children?: React.ReactNode; /** * 内部属性,和 title 为互斥属性,用于承接上层 renderTab */ renderContent?: (props: { title: React.ReactNode; active: boolean; }) => React.ReactNode; /** * 点击回调 */ onClick?: (key: string | number) => void; }