diff --git a/src/design-system/composites/index.ts b/src/design-system/composites/index.ts index c2639bc..d423caa 100644 --- a/src/design-system/composites/index.ts +++ b/src/design-system/composites/index.ts @@ -13,6 +13,7 @@ export type { Column, DataTableProps } from './DataTable/types' export { DetailPanel } from './DetailPanel/DetailPanel' export { EntityList } from './EntityList/EntityList' export { Dropdown } from './Dropdown/Dropdown' +export type { DropdownItem } from './Dropdown/Dropdown' export { EventFeed } from './EventFeed/EventFeed' export { GroupCard } from './GroupCard/GroupCard' export { KpiStrip } from './KpiStrip/KpiStrip' diff --git a/src/design-system/layout/TopBar/TopBar.tsx b/src/design-system/layout/TopBar/TopBar.tsx index 2b194d0..17bf51d 100644 --- a/src/design-system/layout/TopBar/TopBar.tsx +++ b/src/design-system/layout/TopBar/TopBar.tsx @@ -17,6 +17,7 @@ interface TopBarProps { breadcrumb: BreadcrumbItem[] environment?: ReactNode user?: { name: string } + userMenuItems?: import('../../composites/Dropdown/Dropdown').DropdownItem[] onLogout?: () => void className?: string } @@ -32,6 +33,7 @@ export function TopBar({ breadcrumb, environment, user, + userMenuItems, onLogout, className, }: TopBarProps) { @@ -114,6 +116,8 @@ export function TopBar({ } items={[ + ...(userMenuItems ?? []), + ...(userMenuItems?.length ? [{ label: '', divider: true }] : []), { label: 'Logout', icon: , onClick: onLogout }, ]} />