Scrum4Me/components/shared/code-badge.tsx
Madhura68 8ffbc526d5 feat(ST-507): add code-helpers and CodeBadge component
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 20:36:33 +02:00

20 lines
476 B
TypeScript

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>
)
}