Tokens
Renders syntax highlighted tokens for the CodeBlock component.
API Reference
Tokens
View Sourcetokens
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
stringpopover
stringstyle
{ token?: React.CSSProperties popover?: React.CSSProperties }= {}Styles to apply to the tokens and popover elements.
token
React.CSSPropertiespopover
React.CSSPropertiesrenderLine
(line: { children: React.ReactNode index: number isLast: boolean }) => React.ReactNodeCustom render function for each line of tokens.
Last updated