|
1 | 1 | import { useCallback, useMemo, useState } from 'react'; |
| 2 | +import { Badge } from '@clickhouse/click-ui'; |
2 | 3 | import { TMetricSource } from '@hyperdx/common-utils/dist/types'; |
3 | 4 | import { |
4 | | - Badge, |
5 | 5 | Box, |
6 | 6 | Button, |
7 | 7 | Collapse, |
@@ -237,9 +237,11 @@ export function AttributeValueList({ |
237 | 237 | <Text size="sm" fw={500}> |
238 | 238 | {attribute.name} |
239 | 239 | </Text> |
240 | | - <Badge size="xs" variant="default"> |
241 | | - {CATEGORY_LABELS[attribute.category]} |
242 | | - </Badge> |
| 240 | + <Badge |
| 241 | + size="sm" |
| 242 | + text={CATEGORY_LABELS[attribute.category]} |
| 243 | + state="neutral" |
| 244 | + /> |
243 | 245 | </Group> |
244 | 246 | </UnstyledButton> |
245 | 247 | {onAddToGroupBy && ( |
@@ -366,9 +368,7 @@ export function AttributeList({ |
366 | 368 | <Text size="xs" fw={600} c="dimmed"> |
367 | 369 | {CATEGORY_LABELS[category]} |
368 | 370 | </Text> |
369 | | - <Badge size="xs" variant="default"> |
370 | | - {attrs.length} |
371 | | - </Badge> |
| 371 | + <Badge size="sm" text={attrs.length} state="neutral" /> |
372 | 372 | </Group> |
373 | 373 | <Flex gap={6} wrap="wrap"> |
374 | 374 | {attrs.map(attr => ( |
@@ -447,22 +447,28 @@ export function MetricAttributeHelperPanel({ |
447 | 447 | <Text size="xs" c="dimmed"> |
448 | 448 | Unit: |
449 | 449 | </Text> |
450 | | - <Badge size="xs" variant="light"> |
451 | | - {formatUnitDisplay(metricMetadata.unit)} |
452 | | - </Badge> |
| 450 | + <Badge |
| 451 | + size="sm" |
| 452 | + text={formatUnitDisplay(metricMetadata.unit)} |
| 453 | + state="info" |
| 454 | + /> |
453 | 455 | </Group> |
454 | 456 | )} |
455 | 457 | </Box> |
456 | 458 | <Group gap="xs" wrap="nowrap"> |
457 | 459 | {!!metricType && ( |
458 | | - <Badge size="xs" variant="light"> |
459 | | - {metricKindLabel(metricType)} |
460 | | - </Badge> |
| 460 | + <Badge |
| 461 | + size="sm" |
| 462 | + text={metricKindLabel(metricType)} |
| 463 | + state="info" |
| 464 | + /> |
461 | 465 | )} |
462 | 466 | {attributeKeys.length > 0 && ( |
463 | | - <Badge size="xs" variant="light"> |
464 | | - {attributeKeys.length} attributes |
465 | | - </Badge> |
| 467 | + <Badge |
| 468 | + size="sm" |
| 469 | + text={`${attributeKeys.length} attributes`} |
| 470 | + state="neutral" |
| 471 | + /> |
466 | 472 | )} |
467 | 473 | <IconChevronDown |
468 | 474 | size={16} |
|
0 commit comments