]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/blob
7047a1a3c68d6a7cd057abac797f9fc81f7bab57
[ceph.git] /
1 import { Component, ContentChild, Input, TemplateRef } from '@angular/core';
2
3 /**
4  * A generic productive card component.
5  *
6  * @example
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>
13  */
14 @Component({
15   selector: 'cd-productive-card',
16   standalone: false,
17   templateUrl: './productive-card.component.html',
18   styleUrl: './productive-card.component.scss'
19 })
20 export class ProductiveCardComponent {
21   /* Card Title */
22   @Input() title!: string;
23
24   /* Optional: Applies a tinted-colored background to card */
25   @Input() applyShadow: boolean = false;
26
27   /* Optional: Header action template, appears alongwith title in top-right corner */
28   @ContentChild('headerAction', {
29     read: TemplateRef
30   })
31   headerActionTemplate?: TemplateRef<any>;
32
33   /* Optional: Footer template , otherwise no footer will be used for card.*/
34   @ContentChild('footer', {
35     read: TemplateRef
36   })
37   footerTemplate?: TemplateRef<any>;
38 }