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:
parent
33d66bc7c4
commit
8ffbc526d5
2 changed files with 74 additions and 0 deletions
20
components/shared/code-badge.tsx
Normal file
20
components/shared/code-badge.tsx
Normal 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>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue