1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-10-23 18:56:29 +02:00
Files
csslayout/client/SampleCode.jsx
2019-11-15 16:36:42 +07:00

14 lines
334 B
JavaScript

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;