favycon/components/code-highlight/index.tsx
Rui Saraiva efa6b4cc1e
feat: add drag and drop wizard (#39)
* feat(drag-and-drop): add drag and drop wizard

* chore(seo): update seo share image url

* improvement(upload): add download step 3

* improvement(loading): improve loading and add transitions

* improvement: add pwa support, clipboard and animations

* improvement(seo): add html lang and update title

* fix(button): fix button font family
2020-04-19 19:11:20 +01:00

20 lines
460 B
TypeScript

import React from 'react'
import Prism from 'prismjs'
import styles from './index.module.scss'
type CodeHighlightProps = {
template: string
}
const CodeHighlight = ({ template }: CodeHighlightProps) => {
const htmlCode = Prism.highlight(template, Prism.languages.markup, 'markup')
return (
<pre className={styles.root}>
<code className="language-markup" dangerouslySetInnerHTML={{ __html: htmlCode }}></code>
</pre>
)
}
export { CodeHighlight }