import { Avatar, Tag, Typography } from '@douyinfe/semi-ui'; 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, actions, className = '', ariaLabel }: { title: ReactNode; description: ReactNode; eyebrow?: ReactNode; icon?: ReactNode; tone?: WorkspaceCommandTone; status?: string; statusColor?: React.ComponentProps['color']; meta?: ReactNode; actions?: ReactNode; className?: string; ariaLabel?: string; }) { const hasIdentity = eyebrow != null || icon != null; const rootClassName = [ 'v2-workspace-command-bar', hasIdentity ? 'has-identity' : '', hasIdentity ? `is-${tone}` : '', className ].filter(Boolean).join(' '); return (
{hasIdentity ? <> {icon} {eyebrow ? {eyebrow} : null} {title} {description} : <> {title} {description} }
{status || meta || actions ?
{status ? {status} : null} {meta ? {meta} : null} {actions}
: null}
); }