mirror of
https://git.um-react.app/um/um-react.git
synced 2026-08-27 20:02:01 +00:00
11 lines
384 B
TypeScript
11 lines
384 B
TypeScript
import { Light as SyntaxHighlighter, type SyntaxHighlighterProps } from 'react-syntax-highlighter';
|
|
import hljsStyleGitHub from 'react-syntax-highlighter/dist/esm/styles/hljs/github';
|
|
|
|
export function CodeHighlight({ children, ...props }: SyntaxHighlighterProps) {
|
|
return (
|
|
<SyntaxHighlighter style={hljsStyleGitHub} {...props}>
|
|
{children}
|
|
</SyntaxHighlighter>
|
|
);
|
|
}
|