npm i mind-table
- you should import TableMindTree components from lib, and import css from node_modules.
- you should pass a initial Data for render the view.
- you must set height and width for container.
import { TableMindTree, getData } from "mind-table"
import "../node_modules/mind-table/lib/style.css"
import { initialNodes } from "./components/nodes-edges"
function App() {
return (
<>
<button
onClick={() => {
let data = getData()
console.log(data, "Here is TableMindTree data")
}}
>
Get data
</button>
<div style={{ width: "1000px", height: "500px" }}>
<TableMindTree data={initialNodes} />
</div>
</>
)
}
export default App
You can call getData to get latest TableMindTree status.