fix(ui): consistent attribute badge colors based on value hash across all views
This commit is contained in:
@@ -5,6 +5,7 @@ import { StatusDot, MonoText, Badge } from '@cameleer/design-system';
|
||||
import { useCorrelationChain } from '../../api/queries/correlation';
|
||||
import { useAgents } from '../../api/queries/agents';
|
||||
import type { ExecutionDetail } from '../../components/ExecutionDiagram/types';
|
||||
import { attributeBadgeColor } from '../../utils/attribute-color';
|
||||
import styles from './ExchangeHeader.module.css';
|
||||
|
||||
interface ExchangeHeaderProps {
|
||||
@@ -63,7 +64,7 @@ export function ExchangeHeader({ detail, onCorrelatedSelect }: ExchangeHeaderPro
|
||||
<>
|
||||
<span className={styles.separator} />
|
||||
{attrs.map(([k, v]) => (
|
||||
<Badge key={k} label={`${k}: ${v}`} color="auto" />
|
||||
<Badge key={k} label={`${k}: ${v}`} color={attributeBadgeColor(String(v))} />
|
||||
))}
|
||||
</>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user