UNPKG

@lunit/oui

Version:

Lunit Oncology UI components

32 lines (31 loc) 992 B
/// <reference types="react" /> import type { TabPanelProps } from '@mui/lab/TabPanel'; import type { TabProps, TabsProps } from '@mui/material'; type TabSize = 'small' | 'medium'; type ButtonVariant = 'normal' | 'toggle'; interface TabConfig { value: string; element: React.ReactNode; disabled?: boolean; } interface BaseTabProps extends TabProps { size?: TabSize; buttonVariant?: ButtonVariant; } interface BaseTabsProps extends TabsProps { size?: TabSize; buttonVariant?: ButtonVariant; } interface TabbedPanelProps { tabs: TabConfig[]; activatedTab: string; size?: TabSize; buttonVariant?: ButtonVariant; menuVariant?: TabsProps['variant']; TabsProps?: Partial<TabsProps>; TabProps?: Partial<TabProps>; TabPanelProps?: Partial<TabPanelProps>; onActivatedTab: (tab: string) => void; onTabChangeListener?: (newTabValue: string) => void; } export type { TabbedPanelProps, TabConfig, TabSize, BaseTabProps, BaseTabsProps };