Package Exports
- magic-virtual-element
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 (magic-virtual-element) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
magic-virtual-element
A library for building virtual tree elements, with enhanced support for class and style properties.
npm install magic-virtual-elementYou can also use Duo, Bower or download the files manually.
Top-Level API
element(component: string|Function , [props: object], [...children: Array]): ComponentExample
import element from 'magic-virtual-element';
let divStyle = {
color: 'white',
backgroundImage: 'url(' + imgUrl + ')',
WebkitTransition: 'all', // note the capital 'W' here
msTransition: 'all' // 'ms' is the only lowercase vendor prefix
};
element('div', { class: ["App", "foo", "bar"], style: divStyle }, [
element('button', { class: "Button" }, 'Click Me!')
]);