- Code
<Pre
codeBlocks={[
{
language: 'javascript',
content: `var greeting = "Hello, World!";
console.log(greeting);`,
},
]}
/>
- Dropdown CodeBlock
<Pre
codeBlocks={[
{
label: 'JavaScript',
language: 'javascript',
content: `var greeting = "Hello, World!";
console.log(greeting);`,
},
{
label: 'HTML',
language: 'html',
content: `<html>
<body>
<p>Hello, World!
</p>
</body>
</html>`,
},
]}
/>
- iFrame
<Pre
codeBlocks={[
{
iframe: true,
content: `<html>
<body>
<p>Hello, World!
</p>
</body>
</html>`,
},
]}
/>
You still can use
triple-backsticks
but it will be rendered without CopyButton (Its Pre components).