UNPKG

@alifd/meet-react

Version:

Fusion Mobile React UI System Component

49 lines (48 loc) 1.32 kB
import { ReactNode, CSSProperties } from 'react'; import { BaseComponentAttributes } from '../utils/types'; export interface LocaleType { more?: string; } export interface SideBarContextProps { activeKey: string | number; change: (key: string | number) => void; align?: 'left' | 'right'; children?: any; } export interface SideBarItemProps extends BaseComponentAttributes { key?: any; title?: string; icon?: string; count: number; dot: boolean; align?: 'left' | 'right'; itemKey?: any; children?: any; renderContent?: (props: { title: string; active: boolean; icon: string; count: number; dot: boolean; }) => ReactNode; } export interface SideBarProps extends BaseComponentAttributes { activeKey?: string | number; defaultActiveKey?: string | number; align?: 'left' | 'right'; dataSource?: SideBarItemProps[]; height?: string | number; width?: string | number; renderContent?: ReactNode; contentClassName?: string; contentStyle?: CSSProperties; children?: ReactNode; renderSideBar?: (props: { title: string; active: boolean; icon: string; count: number; dot: boolean; }) => ReactNode; onChange?: (key: string | number) => void; }