DocsBlogChangelog

Tokens

Renders syntax highlighted tokens for the CodeBlock component.

API Reference

tokens

Awaited<ReturnType<GetTokens>>

Syntax highlighted tokens from getTokens to render.

className

{ token?: string popover?: string }= {}

Class names to apply to the tokens and popover elements.

token

string

popover

string

style

{ token?: React.CSSProperties popover?: React.CSSProperties }= {}

Styles to apply to the tokens and popover elements.

token

React.CSSProperties

popover

React.CSSProperties

renderLine

(line: { children: React.ReactNode index: number isLast: boolean }) => React.ReactNode

Custom render function for each line of tokens.

Last updated