Sha256: 438e5bed8d5c77eadf43ca7948262ba4e9df7cc4ea765ad3ebac0bf933ae1a00

Contents?: true

Size: 1.55 KB

Versions: 2

Compression:

Stored size: 1.55 KB

Contents

var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { controller, target } from '@github/catalyst';
let XBannerElement = class XBannerElement extends HTMLElement {
    dismiss() {
        if (this.shouldReappear()) {
            this.style.setProperty('visibility', 'hidden');
            setTimeout(() => {
                this.style.setProperty('visibility', 'visible');
            }, 2000);
            return;
        }
        const parentElement = this.parentElement;
        if (!parentElement)
            return;
        parentElement.removeChild(this);
    }
    shouldReappear() {
        return this.root.getAttribute('data-reappear') === 'true';
    }
};
__decorate([
    target
], XBannerElement.prototype, "root", void 0);
__decorate([
    target
], XBannerElement.prototype, "titleText", void 0);
XBannerElement = __decorate([
    controller
], XBannerElement);
export { XBannerElement };
if (!window.customElements.get('x-banner')) {
    window.XBannerElement = XBannerElement;
    window.customElements.define('x-banner', XBannerElement);
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
primer_view_components-0.0.107 app/components/primer/beta/x_banner.js
primer_view_components-0.0.106 app/components/primer/beta/x_banner.js