Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

react-sortable-tree-theme-file-explorer

frontend-collective33.1kMIT2.0.0TypeScript support: definitely-typed

File explorer theme for react-sortable-tree

react, react-component

readme

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>
    );
  }
}

changelog

Change Log

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

2.0.0 (2018-09-04)

Styles

BREAKING CHANGES

  • now uses react-sortable-tree@2

1.1.3 (2018-09-04)

1.1.2 (2017-11-28)

Bug Fixes

  • silence warning on latest react-sortable-tree (7c81d55)

1.1.1 (2017-11-01)

Bug Fixes

1.1.0 (2017-10-29)

Features

  • Complete basic appearance (98a8d09)