@alifd/meet-react
Version:
Fusion Mobile React UI System Component
42 lines (41 loc) • 1.35 kB
TypeScript
import { EventHandler, ReactNode } from 'react';
import { BaseComponentAttributes, BasicDirectionType, BasicSizeType, HTMLAttributesWeak } from '../utils/types';
interface NavDataItem {
key?: string;
label: string;
iconUri?: string;
icon?: string;
}
export interface NavProps extends HTMLAttributesWeak, BaseComponentAttributes {
size?: BasicSizeType;
type?: 'normal' | 'primary' | 'inverse';
model?: 'solid' | 'text';
direction?: BasicDirectionType;
defaultSelectedKeys?: string;
selectedKeys?: string | number;
dataSource?: NavDataItem[];
children?: any;
onSelect?: (value?: any, event?: EventHandler<any>) => void;
}
export interface NavContextProps extends NavProps {
clsPrefix: string;
curSelectedKeys: any[];
onItemSelect?: (itenKey?: any, e?: any) => void;
}
export interface NavItemProps extends HTMLAttributesWeak, BaseComponentAttributes {
itemKey?: string | number;
icon?: string | ReactNode;
iconUri?: string;
label?: string | ReactNode;
level?: number;
children?: any;
extra?: ReactNode;
onClick?: (key?: any) => void;
disableSelect?: boolean;
onItemSelect?: (value: any, event: EventHandler<any>) => void;
}
export interface SubNavProps extends NavItemProps {
expanded?: boolean;
dataSource?: NavDataItem[];
}
export {};