mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-10-22 18:26:39 +02:00
14 lines
335 B
TypeScript
14 lines
335 B
TypeScript
import React from 'react';
|
|
|
|
import highlight from '../helpers/highlight';
|
|
|
|
const SampleCode = ({ code, lang }) => {
|
|
return code === ''
|
|
? <></>
|
|
: (
|
|
<pre className="h-100 lh-copy ma0" dangerouslySetInnerHTML={{ __html: highlight(code, lang) }} />
|
|
);
|
|
};
|
|
|
|
export default SampleCode;
|