@c8y/ngx-components
Version:
Angular modules for Cumulocity IoT applications
24 lines • 3.46 kB
JavaScript
import { Component, Input } from '@angular/core';
import { kebabCase } from 'lodash-es';
import * as i0 from "@angular/core";
import * as i1 from "../common/icon.directive";
import * as i2 from "../i18n/c8y-translate.pipe";
export class QuickLinkComponent {
constructor() {
this.classes = '';
}
ngOnInit() {
this.classes = `card-block text-center ${kebabCase(this.label)}`;
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: QuickLinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: QuickLinkComponent, selector: "c8y-quick-link", inputs: { icon: "icon", label: "label" }, ngImport: i0, template: "<div [class]=\"classes\">\r\n <i [c8yIcon]=\"icon\" class=\"c8y-icon-duocolor icon-32\"></i>\r\n <p class=\"text-muted\" title=\"{{ label | translate }}\">{{ label | translate }}</p>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: QuickLinkComponent, decorators: [{
type: Component,
args: [{ selector: 'c8y-quick-link', template: "<div [class]=\"classes\">\r\n <i [c8yIcon]=\"icon\" class=\"c8y-icon-duocolor icon-32\"></i>\r\n <p class=\"text-muted\" title=\"{{ label | translate }}\">{{ label | translate }}</p>\r\n</div>\r\n" }]
}], propDecorators: { icon: [{
type: Input
}], label: [{
type: Input
}] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVpY2stbGluay5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9jb3JlL3F1aWNrbGluay9xdWljay1saW5rL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