UNPKG

2.05 kBMarkdownView Raw
1
2# virtex-element
3
4[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)
5
6A slightly opinionated, higher-level JSX element creator for [virtex](https://github.com/ashaffer/virtex) that wraps it's native `element`.
7
8## Installation
9
10 $ npm install virtex-element
11
12## Features
13
14 * Adds [ev-store](https://github.com/Raynos/ev-store) delegated events via `onXxx` property names - where `Xxx` is an event name (e.g. `onClick`). Use a library like [delegant](https://github.com/ashaffer/delegant) to process them.
15 * Class sugar for arrays/objects. `['nav', 'featured'] -> 'nav featured'`, `{nav: true, featured: true, small: false} -> 'nav featured'`.
16 * `focused` property. If you set the `focused` prop to true, the element will receive focus when it is rendered.
17 * Stringifies `style` objects using [toStyle](https://github.com/radubrehar/toStyle).
18
19## License
20
21The MIT License
22
23Copyright © 2015, Weo.io <info@weo.io>
24
25Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
26
27The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
28
29THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.