@medalsocial/meda
Version:
Shared Meda UI shell and runtime package.
55 lines (54 loc) • 2.58 kB
TypeScript
import { type ReactNode } from 'react';
import type { AppShellAppTabsConfig, PanelView, WorkspaceMenuItem } from './types.js';
export interface WorkspaceSwitcherProps {
/**
* Configurable dropdown items. When provided, REPLACES the default
* "Manage workspaces / Settings / Profile / Sign out" entries. The theme
* toggle is still inserted automatically by meda — between the items and
* the footer — so consumers don't have to reimplement theme cycling.
*
* When omitted, the package-default items render (1.x behavior).
*/
menuItems?: WorkspaceMenuItem[];
/**
* Extra content rendered after all items and the theme toggle. Backwards-
* compatible alias for the legacy `workspaceMenuFooter` prop.
*/
menuFooter?: ReactNode;
/** @deprecated Use `menuFooter` instead. */
workspaceMenuFooter?: ReactNode;
}
export declare function WorkspaceSwitcher({ menuItems, menuFooter, workspaceMenuFooter, }?: WorkspaceSwitcherProps): import("react/jsx-runtime").JSX.Element;
export interface AppTabsProps extends AppShellAppTabsConfig {
}
export declare function AppTabs({ renderLink }?: AppTabsProps): import("react/jsx-runtime").JSX.Element;
export interface PanelToggleProps {
/** Panel views surfaced in the chevron dropdown. Empty → plain toggle. */
panelViews?: PanelView[];
}
export declare function PanelToggle({ panelViews }?: PanelToggleProps): import("react/jsx-runtime").JSX.Element;
export interface ShellHeaderProps {
globalActions?: ReactNode;
/**
* Optional center-region content. Replaces the default application tabs when
* provided.
*/
headerCenter?: ReactNode;
/**
* Optional leading content rendered in the LEFT header region immediately
* after the workspace switcher (separated by whitespace only, no divider).
*/
headerLeading?: ReactNode;
appTabsRenderLink?: AppShellAppTabsConfig['renderLink'];
className?: string;
/**
* Forwarded to the internal `<WorkspaceSwitcher>`. See
* `WorkspaceSwitcherProps` for the full shape.
*/
workspaceMenuItems?: WorkspaceMenuItem[];
workspaceMenuFooter?: ReactNode;
showPanelToggle?: boolean;
/** Panel views forwarded to the header `<PanelToggle>` dropdown. */
panelViews?: PanelView[];
}
export declare function ShellHeader({ globalActions, headerCenter, headerLeading, appTabsRenderLink, className, workspaceMenuItems, workspaceMenuFooter, showPanelToggle, panelViews, }?: ShellHeaderProps): import("react/jsx-runtime").JSX.Element | null;