1 import { Component, ContentChild, Input, TemplateRef } from '@angular/core';
4 * A generic productive card component.
7 * <cd-productive-card title="Card Title"
8 * [applyShadow]="true">
9 * <ng-template #headerAction>...</ng-template>
10 * <ng-template #footer>...</ng-template>
11 * <p>My card body content</p>
12 * </cd-productive-card>
15 selector: 'cd-productive-card',
17 templateUrl: './productive-card.component.html',
18 styleUrl: './productive-card.component.scss'
20 export class ProductiveCardComponent {
22 @Input() title!: string;
24 /* Optional: Applies a tinted-colored background to card */
25 @Input() applyShadow: boolean = false;
27 /* Optional: Header action template, appears alongwith title in top-right corner */
28 @ContentChild('headerAction', {
31 headerActionTemplate?: TemplateRef<any>;
33 /* Optional: Footer template , otherwise no footer will be used for card.*/
34 @ContentChild('footer', {
37 footerTemplate?: TemplateRef<any>;