mirror of
https://github.com/simstudioai/sim.git
synced 2026-02-07 05:05:15 -05:00
* feat(blog): v0.5 post * improvement(blog): simplify title and remove code block header - Simplified blog title from "Introducing Sim Studio v0.5" to "Introducing Sim v0.5" - Removed language label header and copy button from code blocks for cleaner appearance Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * ack PR comments * small styling improvements * created system to create post-specific components * updated componnet * cache invalidation --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
22 lines
514 B
TypeScript
22 lines
514 B
TypeScript
'use client'
|
|
|
|
import { Code } from '@/components/emcn'
|
|
|
|
interface CodeBlockProps {
|
|
code: string
|
|
language: 'javascript' | 'json' | 'python'
|
|
}
|
|
|
|
export function CodeBlock({ code, language }: CodeBlockProps) {
|
|
return (
|
|
<div className='dark w-full overflow-hidden rounded-md border border-[#2a2a2a] bg-[#1F1F1F] text-sm'>
|
|
<Code.Viewer
|
|
code={code}
|
|
showGutter
|
|
language={language}
|
|
className='[&_pre]:!pb-0 m-0 rounded-none border-0 bg-transparent'
|
|
/>
|
|
</div>
|
|
)
|
|
}
|