Tokens
Renders syntax highlighted tokens for the CodeBlock
component.
API Reference
Tokens
(props: TokensProps) => JSX.Element
Renders syntax highlighted tokens for the CodeBlock
component.
Parameters
TokensProps
Returns
ElementTokensProps
TokensProps
Properties
tokens
Array<Tokens> | undefined
Syntax highlighted tokens from getTokens
to render.
css
{ token?: CSSObject; popover?: CSSObject; } | undefined
CSS style object to apply to the tokens and popover elements.
className
{ token?: string; popover?: string; } | undefined
Class names to apply to the tokens and popover elements.
style
{ token?: React.CSSProperties; popover?: React.CSSProperties; } | undefined
Styles to apply to the tokens and popover elements.
renderLine
((line: { children: React.ReactNode; index: number; isLast: boolean; }) => React.ReactNode) | undefined
Custom render function for each line of tokens.
Last updated