feat(org): Ported components to mjs and named exports
This commit is contained in:
parent
37f7833983
commit
595417a23b
118 changed files with 836 additions and 852 deletions
9
sites/shared/components/json.mjs
Normal file
9
sites/shared/components/json.mjs
Normal file
|
@ -0,0 +1,9 @@
|
|||
import React from 'react'
|
||||
import Highlight from 'shared/components/mdx/highlight.mjs'
|
||||
import hljs from 'highlight.js/lib/common'
|
||||
|
||||
export 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} />
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue