LineNumbers
Renders line numbers for the CodeBlock component.
API Reference
Properties
| Property | Type | Modifiers |
|---|---|---|
| highlightRanges? | string | — |
A string of comma separated lines and ranges to highlight. | ||
| css? | CSSObject | — |
CSS object to apply to the line numbers container. | ||
| className? | string | — |
Class name to apply to the line numbers container. | ||
| style? | React.CSSProperties | — |
Style to apply to the line numbers container. | ||
Renders line numbers for the CodeBlock component.
Properties
LineNumbersPropsReturns
Promise<React.JSX.Element>Modifiers
asyncCalculate which lines to highlight based on the range meta string added by the rehype plugin.
Parameters
| Parameter | Type | Default Value |
|---|---|---|
| ranges | string | undefined | — |
Returns
(index: number) => booleanLast updated
CodeBlock
NextQuickInfo