react-traceability
Installation
npm install --save react-traceability
Usage
This is the minimal required configuration.
; { const traceConfig = data: "name": "Root" "children": "name": "Branch 1" "name": "Branch 2" nodeWidth: 182 nodeHeight: 77 ; return <TraceView traceConfig= traceConfig node= #component#" }/> ); }}
Advanced Usage
# Node props can be passed by using nodeConfig # All the props provided in nodeConfig will be passed to node <TraceView traceConfig={ traceConfig } node={ #component#" } nodeConfig={{ cardConfig: {}, zoom: 3}} /> # Config on root node # This paddings will be applied in root node foreign object const rootNodeConfig = <TraceView rootNode={ rootNodeConfig } />
Tests
# Make sure that you've installed the dependencies npm install# Run tests npm test