react-sortable-tree-theme-solverboard
v0.0.9
Published
Customised theme for react-sortable-tree forked from react-sortable-tree-theme-minimal
Downloads
163
Readme
Minimal React Sortable Tree Theme for Solverboard
Features
- Customised Theme for React Sortable Tree - forked from react-sortable-tree-theme-minimal
Usage
npm install --save react-sortable-tree-theme-solverboard
import React, { Component } from 'react';
import SortableTree from 'react-sortable-tree';
import FileExplorerTheme from 'react-sortable-tree-theme-solverboard';
export default class Tree extends Component {
constructor(props) {
super(props);
this.state = {
treeData: [{ title: 'src/', children: [ { title: 'index.js' } ] }],
};
}
render() {
return (
<div style={{ height: 400 }}>
<SortableTree
treeData={this.state.treeData}
onChange={treeData => this.setState({ treeData })}
theme={FileExplorerTheme}
/>
</div>
);
}
}