1.0.6 • Published 5 years ago

sndrew-node-editor v1.0.6

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

sndrew-node-editor

A React Library for creating UI Nodes

npm version npm downloads

Imgur Image

Installation

Make sure you have Node installed and run:

npm install sndrew-node-editor

Usage

Check out my example here on CodeSandbox

The sndrew-node-editor library creates a React component for you to use called Editor.

import { Editor } from "sndrew-node-editor";

You need to supply Editor with an object describing your graph of nodes in the formate below.

interface INode {
  id: string;
  children: INode[]
}

Finally you need to describe what a Node should look like, by supplying Editor with a prop Node, a React Component, which will recieve a single INode data.

interface IEditorProps {
  Node: React.Component<INode>;
  nodes: INode[];
}
1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago