fix: Issues with exports
This commit is contained in:
parent
d703707532
commit
b4c4031fc5
20 changed files with 252 additions and 274 deletions
9
packages/react/components/Json/index.mjs
Normal file
9
packages/react/components/Json/index.mjs
Normal file
|
@ -0,0 +1,9 @@
|
|||
import React from 'react'
|
||||
import { Highlight } from '@freesewing/react/components/Highlight'
|
||||
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