feat(design): add Modernist UI primitives (Button, Tag, StatusTag, Field, Card, table styles)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-30 19:04:05 +08:00
co-authored by Claude Haiku 4.5
parent 3a941a357b
commit 4411ed54b5
9 changed files with 318 additions and 16 deletions
+24
View File
@@ -0,0 +1,24 @@
import type { ReactNode } from 'react'
import { cx } from './cx'
export type TagVariant = 'accent' | 'neutral' | 'outline'
const VARIANTS: Record<TagVariant, string> = {
accent: 'bg-accent-100 text-accent-800',
neutral: 'bg-neutral-100 text-neutral-800',
outline: 'border border-accent text-accent-700',
}
export function Tag({ variant, children, className }: { variant: TagVariant; children: ReactNode; className?: string }) {
return (
<span
className={cx(
'inline-flex items-center gap-1 text-[11px] font-medium tracking-wide px-2.5 py-[3px] whitespace-nowrap',
VARIANTS[variant],
className,
)}
>
{children}
</span>
)
}