Function
CodeSnippet
({ children, className, title, renderNewlines = false }: { children: React.ReactNode, className?: string, title?: string, renderNewlines?: boolean })
Source from the content-addressed store, hash-verified
| 1 | import { cn } from "@/lib/utils" |
| 2 | |
| 3 | export const CodeSnippet = ({ children, className, title, renderNewlines = false }: { children: React.ReactNode, className?: string, title?: string, renderNewlines?: boolean }) => { |
| 4 | return ( |
| 5 | <code |
| 6 | className={cn("bg-gray-100 dark:bg-gray-700 w-fit rounded-md px-2 py-0.5 font-medium font-mono", className)} |
| 7 | title={title} |
| 8 | > |
| 9 | {renderNewlines ? <pre>{children}</pre> : children} |
| 10 | </code> |
| 11 | ) |
| 12 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected