1
0
Fork 0

chore(org): Move github components out of shared

This commit is contained in:
joostdecock 2023-08-15 18:45:25 +02:00
parent 50b6747584
commit 3da46fb672
7 changed files with 137 additions and 88 deletions

View file

@ -1,7 +1,21 @@
export const CodeBox = ({ children }) => (
import { CopyIcon } from 'shared/components/icons.mjs'
import { CopyToClipboard } from 'shared/components/copy-to-clipboard.mjs'
export const CodeBox = ({ code, title }) => (
<div className="hljs my-4">
<div
className={`
flex flex-row justify-between items-center
text-xs font-medium text-success-content
mt-1 border-b border-neutral-content border-opacity-25
px-4 py-1 mb-2 lg:text-sm
`}
>
<span>{title}</span>
<CopyToClipboard text={code} />
</div>
<pre className="language-md hljs text-base lg:text-lg whitespace-break-spaces overflow-scroll pr-4">
{children}
{code}
</pre>
</div>
)