Tokens
Renders syntax highlighted tokens for the CodeBlock component.
API Reference
Type
AnnotationRendererType
AnnotationRenderersProperties
| Property | Type | |
|---|---|---|
| children? | string | Promise<string> | |
| allowErrors? | boolean | string | |
| showErrors? | boolean | |
| shouldAnalyze? | boolean | |
| shouldFormat? | boolean | |
| language? | Languages | |
| css? | { token?: CSSObject | undefined; popover?: CSSObject | undefined; error?: CSSObject | undefined; } | |
| className? | { token?: string | undefined; popover?: string | undefined; error?: string | undefined; } | |
| style? | { token?: CSSProperties | undefined; popover?: CSSProperties | undefined; error?: CSSProperties | undefined; } | |
| theme? | ThemeValue | Record<string, ThemeValue> | |
| renderLine? | (line: { children: ReactNode; index: number; isLast: boolean; }) => ReactNode | |
| annotations? | AnnotationRenderers | |
Renders syntax highlighted tokens for the CodeBlock component.
Properties
TokensPropsLast updated