UNPKG

@cimpress/react-components

Version:
47 lines 1.53 kB
import React, { CSSProperties, ReactNode, ComponentType } from 'react'; import { PublicComponentProps } from '../types'; type TabType = { id: string; title: ReactNode; description?: ReactNode; icon?: ComponentType<any>; 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; /** * Overrides the default behavior of hiding tab groups when there is only one tab group. */ alwaysShowTabGroups?: boolean; } export declare const TabMenu: ({ className, activeTabId, tabs, tabGroups, onTabClick, bodyStyle, tabStyle, style, alwaysShowTabGroups, ...rest }: TabMenuProps) => React.JSX.Element | null; export {}; //# sourceMappingURL=TabMenu.d.ts.map