MCPcopy Create free account
hub / github.com/devnomic/marquee / ReactCodeBlock

Function ReactCodeBlock

example/src/App.tsx:74–94  ·  view source on GitHub ↗
({ code }: { code: string })

Source from the content-addressed store, hash-verified

72}
73
74function ReactCodeBlock({ code }: { code: string }) {
75 return (
76 <CodeBlock
77 code={code}
78 lang="javascript"
79 theme={{
80 light: "vitesse-light",
81 dark: "vitesse-dark",
82 }}
83 transformers={[
84 transformerCopyButton({
85 cssVariables: shikiTransformerCopyBtnCSSVariables,
86 duration: 2000,
87 display: "ready",
88 successIcon: `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E`,
89 copyIcon: `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3C/svg%3E`,
90 }),
91 ]}
92 />
93 );
94}
95
96function App() {
97 return (

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected