@yuntijs/ui
Version:
☁️ Yunti UI - an open-source UI component library for building Cloud Native web apps
55 lines (54 loc) • 1.49 kB
TypeScript
import { type CopyButtonProps } from '@lobehub/ui';
import React, { ReactNode } from 'react';
import { ThemeProps } from "../hooks/useHighlight";
import { DivProps } from "../types";
export interface HighlighterProps extends DivProps {
allowChangeLanguage?: boolean;
/**
* @description The code content to be highlighted
*/
children: string;
copyButtonSize?: CopyButtonProps['size'];
/**
* @description Whether to show the copy button
* @default true
*/
copyable?: boolean;
fileName?: string;
fullFeatured?: boolean;
icon?: ReactNode;
/**
* @description The language of the code content
*/
language: string;
/**
* @description Whether to show language tag
* @default true
*/
showLanguage?: boolean;
/**
* @description Whether add spotlight background
* @default false
*/
spotlight?: boolean;
/**
* @description The variant of the code block
* @default 'filled'
*/
variant?: 'filled' | 'outlined' | 'borderless';
/**
* @description The style of the code content
*/
contentStyle?: React.CSSProperties;
/**
* @description Control text wrap
* @default false
*/
wrap?: boolean;
enableTransformer?: boolean;
theme?: ThemeProps;
animated?: boolean;
}
export declare const Highlighter: React.NamedExoticComponent<HighlighterProps>;
export * from './FullFeatured';
export * from './SyntaxHighlighter';