houdini/app/javascript/legacy/components/modal.js

10 lines
294 B
JavaScript
Raw Normal View History

2019-11-06 20:36:28 +00:00
// License: LGPL-3.0-or-later
const h = require('flimflam/h')
const modal = require('flimflam/ui/modal')
// convenience wrapper for setting modal sizes
// sizes can be 'small' or 'large'
module.exports = (obj, size='medium') =>
h('div', {class: {[`modal-${size}`] : size}}, [ modal(obj)])