mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-12-17 08:09:14 +09:00
18 lines
430 B
Plaintext
18 lines
430 B
Plaintext
# Dialog
|
|
#================================
|
|
|
|
riot = require 'riot'
|
|
|
|
module.exports = (title, text, buttons, can-through, on-through) ~>
|
|
dialog = document.body.append-child document.create-element \mk-dialog
|
|
controller = riot.observable!
|
|
riot.mount dialog, do
|
|
controller: controller
|
|
title: title
|
|
text: text
|
|
buttons: buttons
|
|
can-through: can-through
|
|
on-through: on-through
|
|
controller.trigger \open
|
|
return controller
|