0.5.0 • Published 4 years ago

react-tree-schema v0.5.0

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

react-tree-schema

Tree component for React.js apps.

image (1)

Install

npm install react-tree-schema

Architecture

image (1)

Components

Root Component

import React from 'react'
import Root from 'react-tree-schema'

const Tree = () => (
  <Root childNodes={[
    { 
      name: 'React Team',
      opened: true ,
      childNodes: [
        { 
          name: 'Team Leader', 
          childNodes: [
            { name: 'Abdurrahman EKER' },
          ]
        },
        {
          name: 'Developers', 
          childNodes: [
            { name: 'Kübra TURAN' },
            { name: 'Reyhan ÜNAL' },
            { name: 'Osman PEKAYDIN' },
          ]
        },
      ]
    }
  ]}/>
)

Root props

propdefaulttypedescription
namenonestringNode title
childNodesnonearrayNode items
openedfalsebooleanvisible nodes of the noden
iconnoneobjecticon of node
onClicknonefunctionNode on click
onContextMenunonefunctionNode on context menu

Child Node Item

propdefaulttypedescription
namenonestringNode title
childNodesnonearrayNode items
openedfalsebooleanvisible nodes of the noden
iconnoneobjecticon of node
onClicknonefunctionNode on click
onContextMenunonefunctionNode on context menu
0.5.0

4 years ago

0.4.0

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago