UNPKG

infinity-forge

Version:
32 lines (31 loc) 722 B
import { IconsNames } from '../../../../ui/index.js'; export type TabSelected = { key: string; width?: number; translate?: number; }; export type TabContentProps = { changeTab(tabKey: string): void; }; export type TabItem = { key: string; title?: string; image?: { url: string; size?: number; }; icon?: { name?: IconsNames; color?: string; size?: number; element?: () => React.ReactNode; }; hasTitle?: boolean; content: (props: TabContentProps) => React.ReactNode; }; export interface ITabProps { tabs: TabItem[]; mapAllTabs?: boolean; disableIfHasOnlyOneTab?: boolean; onChangeTab?: (tab: TabItem) => void; }