UNPKG

@cbpds/web-components

Version:
72 lines (71 loc) 2.85 kB
/*! * CPB Design System web components - built with Stencil */ import { h, Host } from "@stencil/core"; export class CbpBanner { constructor() { this.color = "info"; } handleDismiss() { this.host.setAttribute("hidden", ""); this.bannerDismiss.emit({ host: this.host }); } render() { return (h(Host, { key: '27a800366e83047f42f66d52967e167c8f1ab51e' }, h("cbp-icon", { key: '0aba337097e9db035326eb0e0bdf6f18c469d91c', class: "cbp-banner-icon-container", name: "exclamation-circle", color: "var(--cbp-color-text-lighter)", size: "3rem" }), h("div", { key: '8c44b69637f8c432dad50740f450ff927549dbed', class: "cbp-banner-text-container" }, h("slot", { key: 'a1d60d1f5294b1d6d552e2bc3362e2b573c592a3', name: "cbp-banner-title" }), h("p", { key: '2f6d6d6be4f8b1046cccd4f7bdbef3bc02571957' }, h("slot", { key: '90293551a75d943c9c7e853b81e6c316d4ce9d1f' })), h("cbp-button", { key: 'c2787a35fb94daf46f0467caa12e4bae431fccfe', type: "button", fill: "solid", color: "primary", context: "dark-always", onButtonClick: () => { this.handleDismiss(); } }, h("cbp-icon", { key: '04a55820ff262295aa3944422bccd9c4303ad47d', name: "circle-xmark", size: "var(--cbp-space-5x)" }), "Dismiss")))); } static get is() { return "cbp-banner"; } static get originalStyleUrls() { return { "$": ["cbp-banner.scss"] }; } static get styleUrls() { return { "$": ["cbp-banner.css"] }; } static get properties() { return { "color": { "type": "string", "mutable": false, "complexType": { "original": "\"info\"", "resolved": "\"info\"", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Specifies a color variant for the banner." }, "attribute": "color", "reflect": true, "defaultValue": "\"info\"" } }; } static get events() { return [{ "method": "bannerDismiss", "name": "bannerDismiss", "bubbles": true, "cancelable": true, "composed": true, "docs": { "tags": [], "text": "A custom event emitted with the Banner is dismissed." }, "complexType": { "original": "any", "resolved": "any", "references": {} } }]; } static get elementRef() { return "host"; } } //# sourceMappingURL=cbp-banner.js.map