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:
@@ -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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user