1
0
Fork 0

feat(components): Added pan and zoom to Workbench. Closes #368

This commit is contained in:
Joost De Cock 2020-04-25 13:29:02 +02:00
parent b53615aea0
commit 054b7565e6
9 changed files with 397 additions and 91 deletions

View 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