@poouladorbit/treeway
v1.0.3
Published
Show your files and directories like tree branches🌴
Downloads
16
Maintainers
Readme
treeway🌴
Show your files and directories like tree branches🌴
install with npm
npm install @poouladorbit/treeway
install with yarn
yarn add @poouladorbit/treeway
Usage
To use the treeway🌴, use the following example:
import React from "react";
import Treeway from "@poouladorbit/treeway";
function Test() {
const items = [
{
name: "folder1",
type: "directory",
children: [
{
name: "file-1",
type: "file",
},
],
},
];
return (
<div>
<Treeway items={items} />
</div>
);
}
export default Test;
props
- items: array of objects(node data).
- backgroundColor: background color for the buttons.
- direction: direction of treeway to open subitems in left or right.
sample image of the project
Contributing
This is my first package😁. So if you find any issues or have suggestions for improvements, please open an issue or submit a pull request on GitHub.
Please follow the semantic-release package rules for commits. for more information see Semantic-Release
License
This project is licensed under the MIT License - see the License file for details.
Todo
- [ ] imporve style
- [ ] add checkbox(optional props)