@vendasta/store
Version:
Components and data for Store
33 lines (32 loc) • 2.23 kB
JavaScript
import { Component, Input } from '@angular/core';
var VaSellingInfoComponent = /** @class */ (function () {
function VaSellingInfoComponent() {
}
Object.defineProperty(VaSellingInfoComponent.prototype, "filterDescription", {
get: function () {
var desc = this.description.replace(/max-width:\d*[^\"]/i, 'max-width:100%');
if ((desc.indexOf('"max-width:100%"') === -1) && (desc.indexOf('<iframe ') !== -1)) {
var index = desc.indexOf('<iframe ') + 7;
return desc.substr(0, index) + ' style="max-width:100%"' + desc.substr(index);
}
return String(desc);
},
enumerable: true,
configurable: true
});
VaSellingInfoComponent.decorators = [
{ type: Component, args: [{
selector: 'va-selling-info',
template: "\n <section *ngIf=\"description\" class=\"resize\" [innerHtml]=\"filterDescription | vaSafeHtml\"></section>\n <section *ngIf=\"keySellingPoints && keySellingPoints.length > 0\" class=\"key-selling-points\">\n <div *ngFor=\"let ksp of keySellingPoints\" class=\"key-selling-point\">\n <mat-icon>check_circle</mat-icon>\n {{ ksp }}\n </div>\n </section>\n ",
styles: ["section { padding: 24px; } section ::ng-deep > *:first-child { margin-top: 0; padding-top: 0; } @media screen and (max-width: 600px) { .resize { font-size: 16px; } } #description * { max-width: 100% !important; } .key-selling-point { display: flex; align-items: center; padding-bottom: 24px; font-size: 16px; } @media screen and (max-width: 600px) { .key-selling-point { align-items: flex-start; } } .key-selling-point:last-of-type { padding-bottom: 0; } .key-selling-point mat-icon { color: #4caf50; font-size: 32px; width: 32px; height: 32px; margin-right: 20px; } "]
},] },
];
/** @nocollapse */
VaSellingInfoComponent.ctorParameters = function () { return []; };
VaSellingInfoComponent.propDecorators = {
'description': [{ type: Input },],
'keySellingPoints': [{ type: Input },],
};
return VaSellingInfoComponent;
}());
export { VaSellingInfoComponent };