Skip to content

Hyunwooksuh/react-bookmark-tree

Repository files navigation

React bookmark tree

Version License: MIT

A simple react folder tree component

Install

npm i react-bookmark-tree

Usage

image

import { Tree } from "react-boomark-tree"

...

<Tree folderList={folderList} />

...

Tree.propTypes = {
  folderList: PropTypes.array.isRequired
};.

Injection of plain array consist of objects is required for usage. The listed component turns the prop structure into a nested array with hierarchical structures. folderlist json example is as below:

export const folderList = [
  {
    "_id": "a",
    "title": "초보자용 리액트 링크모음",
    "parent_folder": "root"
  },
  {
    "_id": "b",
    "title": "중급자용 리액트 링크모음",
    "parent_folder": "root"
  },
  {
    "_id": "c",
    "title": "고급자용 리액트 링크모음",
    "parent_folder": "a"
  },
  {
    "_id": "d",
    "title": "초보자용 노드 링크모음",
    "parent_folder": "a"
  },
]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published