CodeBlock
Usage
<CodeBlock
code={string}
language?={string}
title?={string}
lineNumbers?={boolean}
highlightLines?={number[]}
>
{children}
</CodeBlock>Props
| Prop | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | The code to display |
| language | string | No | Programming language for syntax highlighting |
| title | string | No | Optional title shown above the code |
| lineNumbers | boolean | No | Show line numbers |
| highlightLines | number[] | No | Line numbers to highlight |
| children | ReactNode | No | Optional custom content to render instead of the code |