react-sortable-tree-theme-zebra

0.0.1 • Public • Published

Striped, minimal-ish React Sortable Tree Theme

theme appearance

Features

  • Striped and somewhat minimalistic Theme for React Sortable Tree
  • Uses fa-bars from fontawesome as the drag handle. The component assumes that fontawesome is already imported in to the page

Usage

npm install --save react-sortable-tree-theme-zebra
import React, { Component } from 'react';
import SortableTree from 'react-sortable-tree';
import ZebraTheme from 'react-sortable-tree-theme-zebra';

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={ZebraTheme}
        />
      </div>
    );
  }
}

Dependents (0)

Package Sidebar

Install

npm i react-sortable-tree-theme-zebra

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

59.5 kB

Total Files

5

Last publish

Collaborators

  • mronkain