UNPKG

596 BJavaScriptView Raw
1var notice = require('notice')
2var tap = require('tap-event')
3var event = require('event')
4require('../style.css')
5var as = require('..')
6
7event.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}))