1.0.5 • Published 4 years ago

esp-library v1.0.5

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

esp-library

component library for the end of studies project by Khalil Jabbahi and Tarik Sghiouri Idrissi

NPM JavaScript Style Guide

Install

npm install --save esp-library

Usage

import React, { Component } from 'react'

import {TreeView} from 'esp-library'

class Example extends Component {

  onSelect = data => console.log(data);

  render () {

    render () {
    //creating TreeView structure 
    const data = [{
      id : 12,
      label : "root",
      icon : icon,
      isOpen : true,
      children : [{   id : 19,
                    label : "rChild1",
                    icon : icon,
                    isOpen : true,
                    onSelect: this.onSelect,
                    children : []
                },{   id : 18,
                  label : "rChild2",
                  icon : icon,
                  isOpen : true,
                  children : [
                    {id : 39,
                    label : "rc",
                    isOpen : true,
                    onSelect: this.onSelect,
                    children : []
                }]
              },{   id : 17,
                label : "rChild3",
                icon : icon,
                isOpen : true,
                onSelect: this.onSelect,
                children : []
            }]
    },{
      id : 14,
      label : "rChild3",
      icon : icon,
      isOpen : true,
      onSelect: this.onSelect,
      children : []
    }
  
  ];

    return (
      <TreeView  data={data}/>
    )
  }
}

License

MIT © Kh4L1L0

1.0.2

4 years ago

1.0.5

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago