nfp_sites/nfp_moe/app/widgets/dialogue.js

18 lines
535 B
JavaScript
Raw Normal View History

2019-09-13 13:33:10 +00:00
const Dialogue = {
view: function(vnode) {
return m('div.floating-container', {
hidden: vnode.attrs.hidden,
}, m('dialogue', [
m('h2', vnode.attrs.title),
m('p', vnode.attrs.message),
m('div.buttons', [
m('button', { class: vnode.attrs.yesclass || '', onclick: vnode.attrs.onyes }, vnode.attrs.yes),
m('button', { class: vnode.attrs.noclass || '', onclick: vnode.attrs.onno }, vnode.attrs.no),
2019-10-01 03:45:44 +00:00
]),
2019-09-13 13:33:10 +00:00
])
)
},
}
module.exports = Dialogue