openreplay/frontend/app/components/ui/HighlightCode/HighlightCode.js
Shekar Siri 2ed5cac986
Webpack upgrade and dependency cleanup (#523)
* change(ui) - webpack update
* change(ui) - api optimize and other fixes
2022-06-03 16:47:38 +02:00

18 lines
480 B
JavaScript

import React from 'react'
import Highlight from 'react-highlight'
import stl from './highlightCode.module.css'
import cn from 'classnames'
import { CopyButton } from 'UI'
function HighlightCode({ className = 'js', text = ''}) {
return (
<div className={stl.snippetWrapper}>
<CopyButton content={text} className={cn(stl.codeCopy, 'mt-2 mr-2')} />
<Highlight className={className}>
{text}
</Highlight>
</div>
)
}
export default HighlightCode