feat(ST-507): add code-helpers and CodeBadge component

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Janpeter Visser 2026-04-26 20:36:33 +02:00
parent 33d66bc7c4
commit 8ffbc526d5
2 changed files with 74 additions and 0 deletions

View file

@ -0,0 +1,20 @@
import { cn } from '@/lib/utils'
interface CodeBadgeProps {
code: string | null | undefined
className?: string
}
export function CodeBadge({ code, className }: CodeBadgeProps) {
if (!code) return null
return (
<span
className={cn(
'inline-flex items-center rounded-md border border-border bg-surface-container px-1.5 py-0.5 font-mono text-[11px] leading-none text-muted-foreground',
className,
)}
>
{code}
</span>
)
}