Code components
Show blocks of code with Hummingbot styled syntax highlighting.
1import CodeBlock from '@hummingbot/hbui/components/code/CodeBlock'
2
3// declare the code to pass to the component using String.raw:
4const myCodeContent = String.raw`<CodeBlock
5 code={myCodeContent}
6/>`
7
8// pass it as a prop to the component:
9<CodeBlock
10 code={myCodeContent}
11/>