custom-progression-tree
v1.1.2
Published
A library for implementing custom progression trees for use in game development, exercise programs, etc in react applications.
Downloads
5
Maintainers
Readme
Example Implementation
import logo from './logo.svg';
import './App.css';
import ProgressionTree from 'custom-progression-tree';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faShip, faScissors, faKhanda } from '@fortawesome/free-solid-svg-icons'
const data = [
{
id: 'header-1',
content: <h2>My Super Cool Skill Tree</h2>,
children: [
{
id: 'child-a',
content: <FontAwesomeIcon icon={faShip} />,
children: [
{
id: 'child-a-a',
content: <b>I like ships</b>,
}
]
},
{
id: 'child-b',
content: <FontAwesomeIcon icon={faScissors} />,
children: [
{
id: 'child-b-a',
content: 'Child B - A',
},
{
id: 'child-b-b',
content: 'Child B - B',
}
]
},
{
id: 'child-c',
content: <FontAwesomeIcon icon={faKhanda} />,
children: [
{
id: 'child-c-a',
content: 'Child C - A',
},
{
id: 'child-c-b',
content: 'Child C - B',
},
{
id: 'child-c-c',
content: 'Child C - C',
}
]
}
]
}
]
function App() {
return (
<ProgressionTree className={'test-class'} data={data} />
);
}
export default App;