Correctly wrap content in pre tag so it doesn't overflow

This commit is contained in:
DaneEveritt 2022-07-10 14:53:15 -04:00
parent edbbe520a7
commit e878015109
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53

View file

@ -9,7 +9,11 @@ export default ({ meta }: { meta: Record<string, unknown> }) => {
return ( return (
<div className={'self-center md:px-4'}> <div className={'self-center md:px-4'}>
<Dialog open={open} onClose={() => setOpen(false)} hideCloseIcon title={'Metadata'}> <Dialog open={open} onClose={() => setOpen(false)} hideCloseIcon title={'Metadata'}>
<pre className={'bg-gray-900 rounded p-2 overflow-x-scroll font-mono text-sm leading-relaxed'}> <pre
className={
'bg-gray-900 rounded p-2 font-mono text-sm leading-relaxed overflow-x-scroll whitespace-pre-wrap'
}
>
{JSON.stringify(meta, null, 2)} {JSON.stringify(meta, null, 2)}
</pre> </pre>
<Dialog.Footer> <Dialog.Footer>