1
0
Fork 0

feat(lab): Draft view pretty ok now

This commit is contained in:
Joost De Cock 2022-01-28 16:57:07 +01:00
parent 73163f5676
commit 929822b249
15 changed files with 327 additions and 29 deletions

View file

@ -0,0 +1,17 @@
import React from 'react'
import Highlight from 'shared/components/mdx/highlight.js'
import hljs from 'highlight.js/lib/common'
const Json = props => {
const code = props.js
? JSON.stringify(props.js, null, 2)
: props.children
return <Highlight
language='json'
raw={hljs.highlight(code, { language: 'json' }).value}
/>
}
export default Json