Created
March 4, 2024 10:30
-
-
Save keyurparalkar/114cc84b4ffb3989626cb28ba951ca15 to your computer and use it in GitHub Desktop.
RecursiveTree with icons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const tree2 = { | |
id: "Parent 1", | |
name: "Parent 1", | |
children: [ | |
{ | |
id: "Child-1", | |
name: "Child-1", | |
icons: [<CiSquarePlus size={25} />, <CiSquareMinus size={25} />], | |
children: [ | |
{ | |
id: "Inner-Child-1", | |
name: "Inner-Child-1", | |
icons: [<CiSquarePlus size={25} />, <CiSquareMinus size={25} />], | |
children: [ | |
{ | |
id: "Inner-Inner-Child-1", | |
name: "Inner-Inner-Child-1", | |
icons: [<CiSquarePlus size={25} />, <CiSquareMinus size={25} />], | |
}, | |
], | |
}, | |
{ | |
id: "Inner-Child-2", | |
name: "Inner-Child-2", | |
icons: [<CiSquarePlus size={25} />, <CiSquareMinus size={25} />], | |
}, | |
], | |
}, | |
{ | |
id: "Child-2", | |
name: "Child-2", | |
icons: [<CiSquarePlus size={25} />, <CiSquareMinus size={25} />], | |
}, | |
], | |
}; | |
<RecursiveTree tree={tree2} />; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment