feat(web): converge workspace identity themes
This commit is contained in:
@@ -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}>
|
||||
|
||||
Reference in New Issue
Block a user