Code API
Returns code snippet representation
added in 1.5.0Import​
import Code from "@tlgr/fmt/react/code";
// or
import { Code } from "@tlgr/fmt/react";
Props​
| Name | Type | Default | Description |
|---|---|---|---|
| children | node | The content of the component. | |
| type | string | inline | Component render type. Can be "inline" or "multiline" |
| lang | string | language code. E.g. python, py, js |