prefixed-virtual-element
v0.1.0
Published
Build virtual tree elements with class attributes and vendor-prefixed styles
Downloads
5
Maintainers
Readme
prefixed-virtual-element
Simply extends dekujs/magic-virtual-element to use vendor-prefixes.
npm install prefixed-virtual-element
Top-Level API
element(component: string|Function , [props: object], [...children: Array]): Component
Example
import element from 'prefixed-virtual-element';
let divStyle = {
color: 'white',
backgroundImage: 'url(' + imgUrl + ')',
transition: 'all', // this will be vendor prefixed
};
element('div', { class: ["App", "foo", "bar"], style: divStyle }, [
element('button', { class: "Button" }, 'Click Me!')
]);