esp-library

1.0.5 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i esp-library

Weekly Downloads

1

Version

1.0.5

License

MIT

Unpacked Size

111 kB

Total Files

6

Last publish

Collaborators

  • kh4l1l