mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-10-23 02:36:11 +02:00
Rename to typescript extension
This commit is contained in:
13
client/components/SampleCode.tsx
Normal file
13
client/components/SampleCode.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
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;
|
Reference in New Issue
Block a user