pinafore/routes/_components/dialog/creators/showConfirmationDialog.js

15 lines
454 B
JavaScript
Raw Normal View History

import ConfirmationDialog from '../components/ConfirmationDialog.html'
import { createDialogElement } from '../helpers/createDialogElement'
import { createDialogId } from '../helpers/createDialogId'
2018-02-05 17:43:45 +00:00
2018-02-09 06:29:29 +00:00
export function showConfirmationDialog (options) {
2018-02-05 17:43:45 +00:00
let dialog = new ConfirmationDialog({
2018-04-01 02:46:44 +01:00
target: createDialogElement(),
2018-02-05 17:43:45 +00:00
data: Object.assign({
id: createDialogId(),
2018-02-05 17:43:45 +00:00
label: 'Confirmation dialog'
}, options)
})
dialog.show()
2018-02-09 06:29:29 +00:00
}