feat(webui): govern actions, quick access, and metrics
Refs #264, #285, #289
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
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}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user