omi-touch
v2.0.0
Published
Smooth scrolling, rotation, pull to refresh and any motion for the web.
Downloads
7
Readme
omi-touch
Smooth scrolling, rotation, pull to refresh and any motion for the web.
Usage
import { render, define, WeElement } from 'omi'
import 'omi-touch'
define('my-app', class extends WeElement {
onChange = value => {
console.log(value)
}
render() {
return (
<div class="main">
<omi-touch min={-1750} max={0} change={this.onChange}>
<div class="touchArea">
<ul>
<li>Hello, Omi-Touch!</li>
<li>AlloyTouch</li>
<li>Omi</li>
...
...
...
<li> row 20</li>
<li> row 21</li>
<li> row 22</li>
<li> row 23</li>
<li> row 24</li>
<li style="border-bottom: none;"> row 25</li>
</ul>
</div>
</omi-touch>
</div>
)
}
})
render(<my-app />, 'body')
License
MIT © dntzhang