function createCodeBlock
createCodeBlock(
code: string,
): string

Create code block HTML string

Examples

Example 1

const html = createCodeBlock('const x = 1;\nconst y = 2;');

Parameters

code: string

Code content

optional
props: CodeBlockProps

Code block configuration

Return Type

string

HTML string

Usage

import { createCodeBlock } from ".";