https://github.com/hipstersmoothie/react-tree
https://github.com/hipstersmoothie/react-tree
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hipstersmoothie/react-tree
- Owner: hipstersmoothie
- License: mit
- Created: 2020-02-24T19:29:50.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-24T19:47:47.000Z (about 5 years ago)
- Last Synced: 2025-01-13T21:25:00.542Z (4 months ago)
- Size: 889 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# React Tress
[](https://travis-ci.org/kenshoo/react-tree)
[](https://codeclimate.com/github/kenshoo/react-tree/test_coverage)Code usage:
```jsx
import ReactTree from "@kenshooui/react-tree";const structure = [
["Profiles", "Performance", "Clicks"],
["Profiles", "Performance", "Imp"],
["Profiles", "Attribute", "Agency"],
["Profiles", "Attribute", "Progress"],
["Profiles", "Attribute", "Create Date"],
["Campaigns", "Performance", "Clicks"],
["Campaigns", "Performance", "Cost"],
["Campaigns", "Performance", "CTR"],
["Campaigns", "Attribute", "campaign name"],
["Ad Groups", "Attribute", "Ad Group Name"]
];{}}
/>;
```## Props
| Name | Type | Default | Description |
| :------------------ | :-------- | :--------------------- | :-------------------------------------------------------------- |
| `structure` | `Array` | `[]` | `Component input - array of leaves along with their ancestors` |
| `title` | `String` | `` | `Title to be displayed on root mode` |
| `onSelect` | `Func` | `` | `callback when clicking a leaf` |
| `NoResultsRenderer` | `` | `no_matching_items.js` | `renderer when having no results on searching` |