0.0.7 • Published 6 years ago

react-json-tree-viewer v0.0.7

Weekly downloads
21
License
MIT
Repository
github
Last release
6 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

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago