chore: Adapt sites to recent changes
This commit is contained in:
parent
147920daeb
commit
43ee0f1790
392 changed files with 1269 additions and 1190 deletions
17
sites/shared/components/json.js
Normal file
17
sites/shared/components/json.js
Normal 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
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue