Files: 6db5c06b9a1d5efd0d5d163b4ca48f35dc046267 / views / new-steps / invoke.js
708 bytesRaw
1 | const { h, computed } = require('mutant') |
2 | |
3 | module.exports = function PickTimes ({ state, prev, next }) { |
4 | const nextBtn = computed(state.title, title => { |
5 | var opts = !title |
6 | ? { disabled: 'disabled' } |
7 | : { className: '-primary', 'ev-click': next } |
8 | |
9 | return h('button', opts, 'Next') |
10 | }) |
11 | |
12 | return h('ScryNewInvoke', [ |
13 | h('h1', 'New Scry'), |
14 | h('div.details', [ |
15 | h('input', |
16 | { |
17 | placeholder: 'Title', |
18 | 'ev-input': ev => { |
19 | state.title.set(ev.target.value) |
20 | } |
21 | }, |
22 | state.title |
23 | ) |
24 | ]), |
25 | h('div.actions', [ |
26 | prev ? h('button', { 'ev-click': prev }, 'Cancel') : null, |
27 | next ? nextBtn : null |
28 | ]) |
29 | ]) |
30 | } |
31 |
Built with git-ssb-web