Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/frontend-collective/react-sortable-tree-theme-full-node-drag

Full node drag theme for react-sortable-tree
https://github.com/frontend-collective/react-sortable-tree-theme-full-node-drag

Last synced: 8 days ago
JSON representation

Full node drag theme for react-sortable-tree

Awesome Lists containing this project

README

        

# React Sortable Tree Full Node Drag Theme
theme appearance

## Features
* No drag handles. You can click anywhere on a node to drag it.

## Usage

```sh
npm install --save react-sortable-tree-theme-full-node-drag
```

```jsx
import React, { Component } from 'react';
import SortableTree from 'react-sortable-tree';
import FileExplorerTheme from 'react-sortable-tree-theme-full-node-drag';

export default class Tree extends Component {
constructor(props) {
super(props);

this.state = {
treeData: [{ title: 'src/', children: [ { title: 'index.js' } ] }],
};
}

render() {
return (


this.setState({ treeData })}
theme={FileExplorerTheme}
/>

);
}
}
```