Files
govoplan-core/webui/src/components/WorkspaceActionBar.tsx
T

30 lines
887 B
TypeScript

import type { ComponentProps } from "react";
import PageActionBar, { type PageActionBarProps, type SemanticActionBarScope } from "./PageActionBar";
export type WorkspaceActionScope = Exclude<SemanticActionBarScope, "page">;
export type WorkspaceActionBarProps = PageActionBarProps & {
scope?: WorkspaceActionScope;
};
/**
* Semantic actions for full-canvas workspaces and their collection, detail,
* and editor panes. It deliberately shares the page action engine while using
* compact panel-header geometry.
*/
export default function WorkspaceActionBar({
scope = "workspace",
...props
}: WorkspaceActionBarProps) {
const actionProps = props as ComponentProps<typeof PageActionBar>;
return (
<PageActionBar
{...actionProps}
actionScope={scope}
density="compact"
surface="panel-header"
data-workspace-action-scope={scope}
/>
);
}