0.0.7 • Published 5 years ago

react-json-tree-viewer v0.0.7

Weekly downloads
21
License
MIT
Repository
github
Last release
5 years ago

react-json-tree-viewer

Build Status

react-json-tree-viewer

Usage

import Rjv from 'react-json-tree-viewer'

const json = {
  array: [1, 2, 3],
  bool: true,
  object: {
    foo: 'bar'
  }
}

<Rjv data={json} />

Result

Props

NameTypeDefaultDescription
dataobject/array{}json data
hideRootbooleanfalseif show root
shouldExpandNode(path: string[], data: any) => booleannullif expand object or array in first render
onArrowClick(path: string[], expanded: boolean) => voidnullhanle arrow click
labelRenderer(keyName: string) => JSX.Elementnullcustom render label
valueRenderer(data: any) => JSX.Elementnullcustom render value
typeRenderer(data: any) => JSX.Elementnullcustom type laber
arrowStyleReact css Propertiesnullcustom arrow style
0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago