Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Mini Card Template
<mat-card class="dashboard-card">
<mat-card-header class="card-header">
<h1 class="value-text" *ngIf="isCurrency">{{value | currency:'$':'symbol':'0.0' }}</h1>
<h1 class="value-text" *ngIf="!isCurrency">{{value}}</h1>
<div mat-card-avatar class="card-icon">
<mat-icon [color]="color" class="avatar-icon">{{icon}}</mat-icon>
<h3 class="title-text">{{title}}</h3>
<p class="difference-text">
[ngClass]="{ 'green-text': isIncrease, 'red-text': !isIncrease }">{{ isIncrease ? '+' : '-' }}{{ percentValue | percent:'2.1-2' }}
<mat-icon *ngIf="isIncrease">arrow_upward</mat-icon>
<mat-icon *ngIf="!isIncrease">arrow_downward</mat-icon>
<span class="duration">{{duration}}</span>
Copy link

yakubaliali commented Jan 29, 2022


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment