1 | var notice = require('notice')
|
2 | var tap = require('tap-event')
|
3 | var event = require('event')
|
4 | require('../style.css')
|
5 | var as = require('..')
|
6 |
|
7 | event.bind(document.getElementById('demo'), 'touchstart', tap(function () {
|
8 | as({
|
9 | save: {
|
10 | text: 'save',
|
11 | callback: function () {
|
12 | notice('Save tapped', {duration: 2000})
|
13 | }
|
14 | },
|
15 | complain: {
|
16 | text: 'complain',
|
17 | callback: function () {
|
18 | notice('Complain tapped', {duration: 2000})
|
19 | }
|
20 | },
|
21 | cancel: {
|
22 | text: 'cancel'
|
23 | }
|
24 | }).then(function () {
|
25 | console.log('action sheet shown')
|
26 | })
|
27 | }))
|