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

21 lines
534 B
JavaScript
Raw Normal View History

import ImageDialog from '../components/ImageDialog.html'
import { createDialogElement } from '../helpers/createDialogElement'
import { createDialogId } from '../helpers/createDialogId'
export default function showImageDialog (poster, src, type, width, height, description) {
let imageDialog = new ImageDialog({
2018-04-01 01:46:44 +00:00
target: createDialogElement(),
data: {
id: createDialogId(),
label: 'Image dialog',
poster,
src,
type,
width,
height,
description
}
})
imageDialog.show()
2018-02-09 06:29:29 +00:00
}