Module:Mbox

-- local Mbox = {} local getArgs = require('Dev:Arguments').getArgs

function Mbox.main(frame) local args = getArgs(frame) local priority = ('border-left-color: var(--priority-%s)'):format(     args.priority or '{}'--invalidates if nothing is entered    )

local container = mw.html.create('div') :addClass('mbox') :cssText(priority) :tag('div') :addClass('mbox__content') :tag('div') :addClass('mbox__content__header') :wikitext(args.header) :done :tag('div') :addClass('mbox__content__text') :wikitext(args.content) :done :tag('div') :addClass('mbox__close') :attr('title', 'Dismiss') :wikitext('×') :done :done :done

return container end

return Mbox