Layer supports Layer.fire() and Layer.$(...).fire() (builder style), and returns a Promise result.
// 1) Static fire
Layer.fire({ title: 'Hello', text: 'Layer.fire(...)', icon: 'info' });
// 2) Builder style
Layer.$()
.config({ title: 'Confirm?', icon: 'warning', showCancelButton: true })
.fire()
.then((res) => console.log(res));
<button class="btn primary">Layer.fire()</button> <button class="btn">Layer.$().config().fire()</button>
/* Local styles for buttons only */