feat(components): Added pan and zoom to Workbench. Closes #368
This commit is contained in:
parent
b53615aea0
commit
054b7565e6
9 changed files with 397 additions and 91 deletions
20
packages/components/src/Workbench/Json/index.js
Normal file
20
packages/components/src/Workbench/Json/index.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
import React, { useState } from 'react'
|
||||
import Prism from 'prismjs'
|
||||
|
||||
const PatternJson = (props) => {
|
||||
let gist = Prism.highlight(
|
||||
JSON.stringify(props.gist, null, 2),
|
||||
Prism.languages.javascript,
|
||||
'javascript'
|
||||
)
|
||||
|
||||
return (
|
||||
<div style={{ padding: '1rem' }}>
|
||||
<div className="gatsby-highlight">
|
||||
<pre className="language-json" dangerouslySetInnerHTML={{ __html: gist }} />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default PatternJson
|
Loading…
Add table
Add a link
Reference in a new issue