6.1.0 • Published 2 months ago

@stoplight/tree-list v6.1.0

Weekly downloads
1,027
License
UNLICENSED
Repository
github
Last release
2 months ago

@stoplight/tree-list

@stoplight/tree-list

Features

  • Component for rendering a tree in a tree like interface
  • Drag and drop support
  • Context menu support
  • Themeable

Installation

Supported in modern browsers.

# latest stable
yarn add @stoplight/tree-list @stoplight/ui-kit

Usage

This is a bare minimum required to have anything rendered.

import { TreeList, TreeStore, Tree } from '@stoplight/tree-list';
import '~@stoplight/tree-list/styles/_tree-list.scss';

const root = Tree.createArtificialRoot();
root.children.push(
  {
    id: generateRandomId(),
    name: 'foo',
    parent: root,
    children: [],
  },
  {
    id: generateRandomId(),
    name: 'bar',
    parent: root,
  },
  {
    id: generateRandomId(),
    name: 'baz',
    parent: root,
    children: [],
  },
);

const store = new TreeStore(new Tree({}, root), new TreeState());

<TreeList store={store} />;

You will also need to make sure the stylesheet is loaded.

@import '~@stoplight/tree-list/styles/tree-list';

Contributing

  1. Clone repo.
  2. Create / checkout feature/{name}, chore/{name}, or fix/{name} branch.
  3. Install deps: yarn.
  4. Make your changes.
  5. Run tests: yarn test.prod.
  6. Stage relevant files to git.
  7. Commit: yarn commit. NOTE: Commits that don't follow the conventional format will be rejected. yarn commit creates this format for you, or you can put it together manually and then do a regular git commit.
  8. Push: git push.
  9. Open PR targeting the master branch.
6.1.0

2 months ago

5.2.2

10 months ago

6.0.0

9 months ago

5.2.1

11 months ago

5.2.0

12 months ago

5.1.0

2 years ago

5.0.5

2 years ago

5.0.4

3 years ago

5.0.3

4 years ago

5.0.2

4 years ago

5.0.1

4 years ago

5.0.0

4 years ago

4.13.0-beta.1

4 years ago

5.0.0-beta.6

4 years ago

5.0.0-beta.5

4 years ago

5.0.0-beta.4

4 years ago

5.0.0-beta.3

4 years ago

5.0.0-beta.2

4 years ago

5.0.0-beta.1

4 years ago

4.12.1

4 years ago

4.12.0

4 years ago

4.11.1

4 years ago

4.11.0

4 years ago

4.10.0

5 years ago

4.9.0

5 years ago

4.8.3

5 years ago

4.8.2

5 years ago

4.8.1

5 years ago

4.8.0

5 years ago

4.7.0

5 years ago

4.6.0

5 years ago

4.5.0

5 years ago

4.4.2

5 years ago

4.4.1

5 years ago

4.4.0

5 years ago

4.3.1

5 years ago

4.3.0

5 years ago

4.2.0

5 years ago

4.1.1

5 years ago

4.1.0

5 years ago

4.0.1

5 years ago

4.0.0

5 years ago

3.8.0

5 years ago

4.0.0-beta.8

5 years ago

4.0.0-beta.7

5 years ago

4.0.0-beta.6

5 years ago

4.0.0-beta.5

5 years ago

4.0.0-beta.4

5 years ago

4.0.0-beta.3

5 years ago

4.0.0-beta.2

5 years ago

4.0.0-beta.1

5 years ago

3.7.0

5 years ago

3.6.0

5 years ago

3.5.0

5 years ago

3.4.0

5 years ago

3.3.1

5 years ago

3.3.0

5 years ago

3.2.0

5 years ago

3.1.0

5 years ago

3.0.0

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.9.0

5 years ago

1.8.0

5 years ago

1.7.1

5 years ago

1.7.0

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago