feat(web): converge workspace identity themes

This commit is contained in:
lingniu
2026-07-20 02:56:13 +08:00
parent 0417056eeb
commit dfa2782db6
7 changed files with 165 additions and 142 deletions

View File

@@ -3,11 +3,14 @@ import type { ReactNode } from 'react';
const { Text, Title } = Typography;
export type WorkspaceCommandTone = 'primary' | 'warning' | 'authority' | 'health';
export function WorkspaceCommandBar({
title,
description,
eyebrow,
icon,
tone = 'primary',
status,
statusColor = 'blue',
meta,
@@ -19,6 +22,7 @@ export function WorkspaceCommandBar({
description: ReactNode;
eyebrow?: ReactNode;
icon?: ReactNode;
tone?: WorkspaceCommandTone;
status?: string;
statusColor?: React.ComponentProps<typeof Tag>['color'];
meta?: ReactNode;
@@ -27,7 +31,12 @@ export function WorkspaceCommandBar({
ariaLabel?: string;
}) {
const hasIdentity = eyebrow != null || icon != null;
const rootClassName = ['v2-workspace-command-bar', hasIdentity ? 'has-identity' : '', className].filter(Boolean).join(' ');
const rootClassName = [
'v2-workspace-command-bar',
hasIdentity ? 'has-identity' : '',
hasIdentity ? `is-${tone}` : '',
className
].filter(Boolean).join(' ');
return (
<header className={rootClassName} aria-label={ariaLabel}>