chore: add resource worker
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import CodeViewer from './code-viewer';
|
||||
import './style.less';
|
||||
|
||||
const HighlightCode: React.FC<{
|
||||
code: string;
|
||||
lang?: string;
|
||||
}> = (props) => {
|
||||
const { code, lang = 'bash' } = props;
|
||||
|
||||
return (
|
||||
<div className="high-light-wrapper">
|
||||
<CodeViewer lang={lang} code={code} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default HighlightCode;
|
||||
Reference in New Issue
Block a user