1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-16 17:33:26 +02:00
market/src/components/@shared/DebugOutput.tsx
2022-01-26 11:55:21 +00:00

19 lines
382 B
TypeScript

import React, { ReactElement } from 'react'
export default function DebugOutput({
title,
output
}: {
title?: string
output: any
}): ReactElement {
return (
<div style={{ marginTop: 'var(--spacer)' }}>
{title && <h5>{title}</h5>}
<pre style={{ wordWrap: 'break-word' }}>
<code>{JSON.stringify(output, null, 2)}</code>
</pre>
</div>
)
}