0.4.2 • Published 6 months ago

mantine-json-view v0.4.2

Weekly downloads
-
License
-
Repository
-
Last release
6 months ago

Mantine JSON View

Install

Mantine JSON View depends on @mantine/core, so make sure to install that dependency as well.

npm

npm install --save @mantine/core mantine-json-view

pnpm

pnpm install --save @mantine/core mantine-json-view

Usage

import { JsonView } from 'mantine-json-view';

function GettingStarted() {
  return (
    <JsonView
      // optional component for collapse icon(s)
      collapseComponent={({ collapsed, setCollapsed }) => (
        <YourCollapseComponents />
      )}
      // optional component for rendering a clipboard icon for copy/paste
      clipboardComponent={({ value }) => <YourClipboardComponent />}
      json="JSON_STRING"
      // syntax highlighting/theming
      theme={{
        colors: {
          key: theme.colors.gray[8],
          literals: {
            boolean: theme.colors.teal[6],
            number: theme.colors.blue[6],
            string: theme.colors.red[6],
            null: theme.colors.orange[9],
          },
        },
        fontFamily: 'monospace',
      }}
    />
  );
}
0.4.2

6 months ago

0.3.0

9 months ago

0.2.1

9 months ago

0.2.0

9 months ago

0.1.3

9 months ago

0.1.2

9 months ago

0.1.0

9 months ago

0.0.8

9 months ago

0.0.7

9 months ago

0.0.6

9 months ago

0.0.5

9 months ago

0.0.4

9 months ago

0.0.3

9 months ago

0.0.2

9 months ago