diff --git a/src/components/top-bar/top-bar.tsx b/src/components/top-bar/top-bar.tsx index 6f9def32..b677b21f 100644 --- a/src/components/top-bar/top-bar.tsx +++ b/src/components/top-bar/top-bar.tsx @@ -30,6 +30,7 @@ export interface Toolbar { breadcrumbs?: { title: string | React.ReactNode, path?: string; }[]; tools?: React.ReactNode; actionMenu?: ActionMenu; + toolBarExtensions?: React.ReactNode[]; } export interface TopBarProps extends React.Props { @@ -85,7 +86,7 @@ const renderBreadcrumbs = (breadcrumbs: { title: string | React.ReactNode, path? ); -const renderActionMenu = (actionMenu: ActionMenu) => ( +const renderActionMenu = (actionMenu: ActionMenu, toolBarExts: React.ReactNode[]) => (
{actionMenu.items.map((item, i) => ( ))} + {toolBarExts && toolBarExts.map((ext, index) => ( + {ext} + ))}
); const renderToolbar = (toolbar: Toolbar) => (
- {toolbar.actionMenu && renderActionMenu(toolbar.actionMenu)} + {toolbar.actionMenu && renderActionMenu(toolbar.actionMenu, toolbar.toolBarExtensions)}
+
{toolbar.filter && renderFilter(toolbar.filter)} {toolbar.tools}