UNPKG

2.27 kBJavaScriptView Raw
1/*!
2 * Bulmil - MIT License
3 */
4'use strict';
5
6Object.defineProperty(exports, '__esModule', { value: true });
7
8const index = require('./index-481858d9.js');
9
10const notificationCss = ".notification:not(:last-child){margin-bottom:1.5rem}.notification{background-color:whitesmoke;border-radius:4px;position:relative;padding:1.25rem 2.5rem 1.25rem 1.5rem}.notification a:not(.button):not(.dropdown-item){color:currentColor;text-decoration:underline}.notification strong{color:currentColor}.notification code,.notification pre{background:white}.notification pre code{background:transparent}.notification>.delete{right:0.5rem;position:absolute;top:0.5rem}.notification .title,.notification .subtitle,.notification .content{color:currentColor}.notification.is-white{background-color:white;color:#0a0a0a}.notification.is-black{background-color:#0a0a0a;color:white}.notification.is-light{background-color:whitesmoke;color:rgba(0, 0, 0, 0.7)}.notification.is-dark{background-color:#363636;color:#fff}.notification.is-primary{background-color:#5851ff;color:#fff}.notification.is-primary.is-light{background-color:#ebebff;color:#0a00f0}.notification.is-link{background-color:#5851ff;color:#fff}.notification.is-link.is-light{background-color:#ebebff;color:#0a00f0}.notification.is-info{background-color:#3e8ed0;color:#fff}.notification.is-info.is-light{background-color:#eff5fb;color:#296fa8}.notification.is-success{background-color:#48c78e;color:#fff}.notification.is-success.is-light{background-color:#effaf5;color:#257953}.notification.is-warning{background-color:#ffe08a;color:rgba(0, 0, 0, 0.7)}.notification.is-warning.is-light{background-color:#fffaeb;color:#946c00}.notification.is-danger{background-color:#f14668;color:#fff}.notification.is-danger.is-light{background-color:#feecf0;color:#cc0f35}";
11
12let Notification = class {
13 constructor(hostRef) {
14 index.registerInstance(this, hostRef);
15 /**
16 * Dismissable
17 */
18 this.dismissable = true;
19 }
20 render() {
21 return (index.h("div", { class: {
22 notification: true,
23 [this.color]: Boolean(this.color),
24 } }, this.dismissable && index.h("button", { class: "delete" }), index.h("slot", null)));
25 }
26};
27Notification.style = notificationCss;
28
29exports.bm_notification = Notification;