import {Component, HostBinding, Input} from '@angular/core'; import {DomSanitizer} from '@angular/platform-browser'; import {ButtonsCustomization} from '../../openaireLibrary/connect/community/CustomizationOptions'; @Component({ selector: 'quick-look-backgrounds', template: `
Dark background

Heading

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent mollis velit ornare, auctor lectus at, rutrum magna. Aenean vehicula elementum lacinia.
Link
Light background

Heading

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent mollis velit ornare, auctor lectus at, rutrum magna. Aenean vehicula elementum lacinia.
Link
`, styles:[` .darkBackground{ background-color: var(--background-dark-color); } .lightBackground{ background-color: var(--background-low-color); } `] }) export class QuickLookBackgroundsComponent { @Input() primaryColor; @Input() secondaryColor; @Input() darkBackgroundColor; @Input() lightBackgroundColor; @Input() buttonsOnDark:ButtonsCustomization; @Input() buttonsOnLight:ButtonsCustomization; constructor( private sanitizer: DomSanitizer) { } @HostBinding("attr.style") public get valueAsStyle(): any { return this.sanitizer.bypassSecurityTrustStyle(`--portal-main-color: ${this.primaryColor}; --portal-dark-color: ${this.secondaryColor}; --background-dark-color: ${this.darkBackgroundColor}; --background-low-color: ${this.lightBackgroundColor};`); } }