swarm-ui: delete StatusChip, migrate its 3 callers to shared Badge
mara: non-interactive Badge and StatusChip render identically (same padding/radius/font, same tone-to-color mapping) and StatusChip's 4-tone/single-label shape is a strict subset of Badge's — no real reason to keep both. Deletes StatusChip.tsx/.css, migrates AgentsPage's config-PR chip, HivesPage's freshness chip, and ComponentsPage's own table-status sample to Badge (tone/value, no onClick). Also drops the now-redundant standalone StatusChip demo section on /components (the Badge section already covers all 4 former chip tones plus accent). Updated the two stale StatusChip references outside swarm-ui too: design-guide.md's component-list example and colors.css's WCAG- contrast-rationale comment.
This commit is contained in:
parent
62cc0620c8
commit
638e1ac2c6
8 changed files with 19 additions and 76 deletions
|
|
@ -21,6 +21,7 @@
|
|||
import { useState } from 'preact/hooks';
|
||||
import { ApiErrorPanel } from '@hive/shared/api-error-panel.js';
|
||||
import { readApiError, type ProblemDetails } from '@hive/shared/api-error.js';
|
||||
import { Badge } from '@hive/shared/badge.js';
|
||||
import { Button } from '../ui/button/Button.js';
|
||||
import { Dialog } from '../ui/dialog/Dialog.js';
|
||||
import { Panel } from '../ui/panel/Panel.js';
|
||||
|
|
@ -29,7 +30,6 @@ import {
|
|||
useRefreshInterval,
|
||||
type RefreshIntervalMs,
|
||||
} from '../ui/refresh-interval/RefreshInterval.js';
|
||||
import { StatusChip } from '../ui/status-chip/StatusChip.js';
|
||||
import { Table, type TableColumn } from '../ui/table/Table.js';
|
||||
import { CreateAgentForm } from './CreateAgentForm.js';
|
||||
|
||||
|
|
@ -50,9 +50,9 @@ const COLUMNS: TableColumn<AgentRow>[] = [
|
|||
header: 'config PR',
|
||||
render: (a) =>
|
||||
a.configPr ? (
|
||||
<StatusChip
|
||||
<Badge
|
||||
tone="warning"
|
||||
label={
|
||||
value={
|
||||
a.configPr.html_url ? (
|
||||
<a href={a.configPr.html_url} target="_blank" rel="noreferrer">
|
||||
#{a.configPr.pr_number}
|
||||
|
|
|
|||
Loading…
Reference in a new issue