Files
faunosteo/apps/app/src/components/ui/Badge.tsx
T
bchanot 8673475293 chore(workspace): move the app to apps/app under a pnpm workspace (step 2)
144 files moved with git mv (pure renames). Root package.json delegates
dev/typecheck/test:run/lint/build to the packages; Node 24 LTS and
pnpm 10.13.1 pinned (.nvmrc, .node-version, engines, packageManager,
root devDependency, engine-strict). Dockerfile builds @faunosteo/app on
node:24-alpine and copies apps/app/dist; nginx and runtime config
unchanged. CI workflow for Gitea Actions. packages/ reserved (README only).
Docs synced: WORKSPACE.md, CLAUDE.md, README, DEPLOY, CHANGELOG, plan.
271/271 tests, typecheck, lint, build green from the root.
2026-10-08 21:51:13 +02:00

26 lines
658 B
TypeScript

import type { ReactNode } from 'react'
export default function Badge({
children,
tone = 'neutral',
className = '',
}: {
children: ReactNode
tone?: 'neutral' | 'accent' | 'warn' | 'danger'
className?: string
}) {
const map = {
neutral: 'bg-[var(--color-surface-strong)] text-[var(--color-ink)]',
accent: 'bg-[var(--color-accent)]/10 text-[var(--color-accent-strong)]',
warn: 'bg-amber-50 text-amber-700',
danger: 'bg-red-50 text-red-700',
} as const
return (
<span
className={`inline-flex items-center px-2 py-0.5 rounded-md text-xs font-medium ${map[tone]} ${className}`}
>
{children}
</span>
)
}