UNPKG

@cimpress/react-components

Version:
43 lines 1.35 kB
import { CSSProperties, ReactNode, Component } from 'react'; import { PublicComponentProps } from '../types'; type TabType = { id: string; title: ReactNode; description?: ReactNode; icon?: typeof Component; body?: ReactNode; }; type TabGroupType = { label: string; tabIds: string[]; }; export interface TabMenuProps extends PublicComponentProps { /** * If provided, the tab menu will mark the matching tab as active and its corresponding * body will be shown. If not provided, the tab menu will default to the first tab. */ activeTabId?: string; /** * An array of tabs to display */ tabs: TabType[]; /** * An array of tab groups for organization */ tabGroups?: TabGroupType[]; /** * If provided, a callback function executed when a user clicks on a specific tab */ onTabClick?: (e: any, tabId: string) => void; /** * Inline styles applied to the body of the Active Tab. */ bodyStyle?: CSSProperties; /** * Inline styles applied to the tab container of the Tab Menu. */ tabStyle?: CSSProperties; } export declare const TabMenu: ({ className, activeTabId, tabs, tabGroups, onTabClick, bodyStyle, tabStyle, style, ...rest }: TabMenuProps) => JSX.Element | null; export {}; //# sourceMappingURL=TabMenu.d.ts.map