@chief-editor/ui
Version:
UI Component for chief editor
19 lines (18 loc) • 657 B
TypeScript
import { HTMLAttributes, ReactNode } from 'react';
import { UnionOmit } from '@co-hooks/util';
export interface ISidebarItem {
id: string;
title?: ReactNode;
extraTitle?: ReactNode;
icon: ReactNode | ((active: boolean) => ReactNode);
content: ReactNode;
}
export declare type SidebarType = 'icon' | 'text';
export interface ISidebarTab {
tabs: ISidebarItem[];
type?: SidebarType;
activeTab?: string;
onActiveTabChange?: (activeTab?: string) => void;
}
export declare type ISidebarTabProps = UnionOmit<ISidebarTab, HTMLAttributes<HTMLDivElement>>;
export declare function SidebarTab(props: ISidebarTabProps): JSX.Element;