Package Exports
- vdom-sidebar
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vdom-sidebar) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
vdom sidebar
virtual-dom sidebar component
install
$ npm install vdom-sidebarexample
var createElement = require('virtual-dom/create-element');
var Sidebar = require('vdom-sidebar');
var items = {
examplePage: { href: '/example', name: 'Example' },
anotherPage: { href: '/another-page', name: 'Another Page' }
};
var sidebarState = Sidebar({
items: items
});
var virtualEl = Sidebar.render(sidebarState);
var el = createElement(virtualEl);
document.getElementById('content').appendChild(el);