import CopyToClipboard from 'shared/components/copy-to-clipboard' const names = { js: 'javascript', bash: 'bash', sh: 'shell', json: 'JSON', yaml: 'YAML', } const Highlight = (props) => { const language = props.language ? props.language : props.children ? props.children.props.className.split('-').pop() : 'txt' const preProps = { className: `language-${language} hljs text-base lg:text-lg whitespace-pre-wrap break-all` } if (props.raw) preProps.dangerouslySetInnerHTML = { __html: props.raw } return (
{props.children}