mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-15 04:51:06 +02:00
14 lines
338 B
TypeScript
14 lines
338 B
TypeScript
import styles from './json-preview.module.css';
|
|
|
|
interface JsonPreviewProps {
|
|
value: Record<string, any> | string;
|
|
}
|
|
|
|
export const JsonPreview = ({ value }: JsonPreviewProps) => {
|
|
return (
|
|
<pre className={styles.preview} style={{ userSelect: 'all' }}>
|
|
{JSON.stringify(value, null, 4)}
|
|
</pre>
|
|
);
|
|
};
|