UNPKG

sb-element

Version:

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.0.1. It is a component library constructed around the SCSS library [Sb-Theming](https://github.com/SeverinBuchser/SbTheming) and supports [Angular Schematics]

30 lines 6.94 kB
import { Component, HostBinding, Input, ViewEncapsulation } from '@angular/core'; import { mixinClassName } from "../../core"; import { ToasterPosition } from "./toaster-position"; import * as i0 from "@angular/core"; import * as i1 from "../toast/toast.component"; import * as i2 from "../../icon/icon/icon.component"; import * as i3 from "@angular/common"; const SbToasterCore = mixinClassName(class { constructor(_elementRef) { this._elementRef = _elementRef; } }, 'sb-toaster'); export class SbToasterComponent extends SbToasterCore { constructor(elementRef) { super(elementRef); this.position = ToasterPosition.TOP_LEFT; } } SbToasterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: SbToasterComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); SbToasterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: SbToasterComponent, selector: "sb-toaster", inputs: { position: "position" }, host: { properties: { "class": "this.position" } }, usesInheritance: true, ngImport: i0, template: "<sb-toast>\n <div header [ngStyle]=\"{'width': '100%','display': 'flex', 'justify-content': 'space-between'}\">\n <div>\n <sb-icon [ngStyle]=\"{'display': 'inline-block'}\" color=\"secondary\">pets</sb-icon>\n SbToast\n </div>\n <span>5 min. ago</span>\n </div>\n <div body>\n This is a rather long toast notification!\n </div>\n</sb-toast>\n<sb-toast>\n <div header [ngStyle]=\"{'width': '100%','display': 'flex', 'justify-content': 'space-between'}\">\n <div>\n <sb-icon [ngStyle]=\"{'display': 'inline-block'}\" color=\"secondary\">pets</sb-icon>\n SbToast\n </div>\n <span>5 min. ago</span>\n </div>\n <div body>\n This is a rather long toast notification!<br>\n This is a rather long toast notification!<br>\n This is a rather long toast notification!\n </div>\n</sb-toast>\n", components: [{ type: i1.SbToastComponent, selector: "sb-toast", inputs: ["visible", "color", "allowWithinClose", "timed"], outputs: ["show", "hide", "close"] }, { type: i2.SbIconComponent, selector: "sb-icon", inputs: ["size", "color", "icon", "isOutline"] }], directives: [{ type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], encapsulation: i0.ViewEncapsulation.None }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: SbToasterComponent, decorators: [{ type: Component, args: [{ selector: 'sb-toaster', encapsulation: ViewEncapsulation.None, template: "<sb-toast>\n <div header [ngStyle]=\"{'width': '100%','display': 'flex', 'justify-content': 'space-between'}\">\n <div>\n <sb-icon [ngStyle]=\"{'display': 'inline-block'}\" color=\"secondary\">pets</sb-icon>\n SbToast\n </div>\n <span>5 min. ago</span>\n </div>\n <div body>\n This is a rather long toast notification!\n </div>\n</sb-toast>\n<sb-toast>\n <div header [ngStyle]=\"{'width': '100%','display': 'flex', 'justify-content': 'space-between'}\">\n <div>\n <sb-icon [ngStyle]=\"{'display': 'inline-block'}\" color=\"secondary\">pets</sb-icon>\n SbToast\n </div>\n <span>5 min. ago</span>\n </div>\n <div body>\n This is a rather long toast notification!<br>\n This is a rather long toast notification!<br>\n This is a rather long toast notification!\n </div>\n</sb-toast>\n" }] }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { position: [{ type: Input }, { type: HostBinding, args: ['class'] }] } }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9hc3Rlci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zYi1lbGVtZW50L3NyYy9saWIvbm90aWZpY2F0aW9uL3RvYXN0ZXIvdG9hc3Rlci5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9zYi1lbGVtZW50L3NyYy9saWIvbm90aWZpY2F0aW9uL3RvYXN0ZXIvdG9hc3Rlci5jb21wb25lbn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