import { Component, Input } from '@angular/core'; export const enum SwatchDepth { none = 'ta-zDepthNone', xs = 'ta-zDepth-xs', sm = 'ta-zDepth-sm', md = 'ta-zDepth-md', lg = 'ta-zDepth-lg', xl = 'ta-zDepth-xl', minContentWidth = 'minContentWidth', } @Component({ selector: 'app-swatch', templateUrl: './swatch.component.html', styleUrls: ['./swatch.component.scss'], styles: [` app-swatch { flex: 1 } `], }) export class SwatchComponent { @Input() public transamerica: boolean = false; @Input() public heading: string; @Input() public descriptor: string; @Input() public img: string; @Input() public minContentWidth: boolean = false; @Input() public hex: string; @Input() public imgSrc: string; @Input() public depth: SwatchDepth = SwatchDepth.none; public setSwatchStyles(): { [key: string]: string } { let styles: { [key: string]: string }; if(this.hex) { styles = { 'background-color': this.hex, } } return styles; } }