bulmil
Version:

62 lines (61 loc) • 1.86 kB
JavaScript
import { Component, Prop, h } from '@stencil/core';
export class Notification {
constructor() {
/**
* Dismissable
*/
this.dismissable = true;
}
render() {
return (h("div", { class: {
notification: true,
[this.color]: Boolean(this.color),
} },
this.dismissable && h("button", { class: "delete" }),
h("slot", null)));
}
static get is() { return "bm-notification"; }
static get originalStyleUrls() { return {
"$": ["notification.scss"]
}; }
static get styleUrls() { return {
"$": ["notification.css"]
}; }
static get properties() { return {
"color": {
"type": "string",
"mutable": false,
"complexType": {
"original": "'is-primary' | 'is-link' | 'is-info' | 'is-success' | 'is-warning' | 'is-danger'",
"resolved": "\"is-danger\" | \"is-info\" | \"is-link\" | \"is-primary\" | \"is-success\" | \"is-warning\"",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Color"
},
"attribute": "color",
"reflect": false
},
"dismissable": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Dismissable"
},
"attribute": "dismissable",
"reflect": false,
"defaultValue": "true"
}
}; }
}