forked from
nekomimi.pet/wisp.place-monorepo
Monorepo for Wisp.place. A static site hosting service built on top of the AT Protocol.
1import ShikiHighlighter from 'react-shiki'
2
3interface CodeBlockProps {
4 code: string
5 language?: string
6 className?: string
7}
8
9export function CodeBlock({ code, language = 'bash', className = '' }: CodeBlockProps) {
10 return (
11 <ShikiHighlighter
12 language={language}
13 theme={{
14 light: 'catppuccin-latte',
15 dark: 'catppuccin-mocha',
16 }}
17 defaultColor="light-dark()"
18 className={className}
19 >
20 {code.trim()}
21 </ShikiHighlighter>
22 )
23}