react-sortable-tree-theme-file-explorer
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/react-sortable-tree-theme-file-explorer package

2.0.0 • Public • Published

React Sortable Tree File Explorer Theme

theme appearance

Features

  • You can click anywhere on a node to drag it.
  • More compact design, with indentation alone used to represent tree depth.

Usage

npm install --save react-sortable-tree-theme-file-explorer
import React, { Component } from 'react';
import SortableTree from 'react-sortable-tree';
import FileExplorerTheme from 'react-sortable-tree-theme-file-explorer';
 
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>
    );
  }
}

Readme

Keywords

Package Sidebar

Install

npm i react-sortable-tree-theme-file-explorer

Weekly Downloads

3,511

Version

2.0.0

License

MIT

Unpacked Size

58.8 kB

Total Files

5

Last publish

Collaborators

  • fritz-c
  • wuweiweiwu