UNPKG

@wandelbots/wandelbots-js-react-components

Version:

React UI toolkit for building applications on top of the Wandelbots platform

45 lines 1.56 kB
import type { SxProps } from "@mui/material"; export interface TabItem { /** Unique identifier for the tab */ id: string; /** Label text for the tab */ label: string; /** Content to display when tab is active */ content: React.ReactNode; /** Optional icon component to display with the tab */ icon?: React.ReactElement; /** Optional badge configuration */ badge?: { /** Badge content (number or string) */ content: React.ReactNode; /** Badge color variant */ color?: "default" | "primary" | "secondary" | "error" | "info" | "success" | "warning"; /** Maximum number to display (e.g., 99+) */ max?: number; /** Show badge even when content is zero */ showZero?: boolean; }; } export interface TabBarProps { /** Array of tab items to display */ items: TabItem[]; /** Controlled active tab index */ activeTab?: number; /** Default active tab index */ defaultActiveTab?: number; /** Callback when tab changes */ onTabChange?: (index: number) => void; /** Additional styling */ sx?: SxProps; /** Ref to the root container element */ ref?: React.Ref<HTMLDivElement>; } /** * A styled tab bar component with configurable tabs and content. * Features the same styling as the Wandelbots design system with rounded tabs * and smooth transitions. */ export declare const TabBar: ((props: TabBarProps) => import("react/jsx-runtime").JSX.Element) & { displayName: string; }; //# sourceMappingURL=TabBar.d.ts.map