mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 05:20:13 +02:00
16 lines
391 B
TypeScript
16 lines
391 B
TypeScript
import styles from './json-preview.module.css';
|
|
|
|
import { Code } from '/@/shared/components/code/code';
|
|
|
|
interface JsonPreviewProps {
|
|
value: Record<string, any> | string;
|
|
}
|
|
|
|
export const JsonPreview = ({ value }: JsonPreviewProps) => {
|
|
return (
|
|
<Code block className={styles.preview} lang="json" p="md">
|
|
{JSON.stringify(value, null, 4)}
|
|
</Code>
|
|
);
|
|
};
|