From 90720da6c28db9dd7311eeb6075f5edae1060135 Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Mon, 8 Aug 2022 20:09:30 +0200 Subject: [PATCH] Harmonize benchmark table styling --- .../components/home-market/home-market.html | 1 + .../lib/benchmark/benchmark.component.html | 98 +++++++++---------- .../src/lib/benchmark/benchmark.component.ts | 1 + libs/ui/src/lib/benchmark/benchmark.module.ts | 8 +- 4 files changed, 58 insertions(+), 50 deletions(-) diff --git a/apps/client/src/app/components/home-market/home-market.html b/apps/client/src/app/components/home-market/home-market.html index e8cf52bee..b0a01a43c 100644 --- a/apps/client/src/app/components/home-market/home-market.html +++ b/apps/client/src/app/components/home-market/home-market.html @@ -34,6 +34,7 @@ - - - Index - - Change from All Time High - from ATH - - - - - - - -
- {{ benchmark.name }} -
- - - - - -
- {{ resolveMarketCondition(benchmark.marketCondition).emoji }} -
- - - + + + + + + + + + + + + + + + + + +
Index + {{ element?.name }} + + Change from All Time High + from ATH + + + +
+ {{ resolveMarketCondition(element.marketCondition).emoji }} +
+
diff --git a/libs/ui/src/lib/benchmark/benchmark.component.ts b/libs/ui/src/lib/benchmark/benchmark.component.ts index c1e35f438..a5c117c24 100644 --- a/libs/ui/src/lib/benchmark/benchmark.component.ts +++ b/libs/ui/src/lib/benchmark/benchmark.component.ts @@ -18,6 +18,7 @@ export class BenchmarkComponent implements OnChanges { @Input() benchmarks: Benchmark[]; @Input() locale: string; + public displayedColumns = ['name', 'change', 'marketCondition']; public resolveMarketCondition = resolveMarketCondition; public constructor() {} diff --git a/libs/ui/src/lib/benchmark/benchmark.module.ts b/libs/ui/src/lib/benchmark/benchmark.module.ts index 3a0eeb5dd..1768aa39f 100644 --- a/libs/ui/src/lib/benchmark/benchmark.module.ts +++ b/libs/ui/src/lib/benchmark/benchmark.module.ts @@ -1,5 +1,6 @@ import { CommonModule } from '@angular/common'; import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; +import { MatTableModule } from '@angular/material/table'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; import { GfValueModule } from '../value'; @@ -8,7 +9,12 @@ import { BenchmarkComponent } from './benchmark.component'; @NgModule({ declarations: [BenchmarkComponent], exports: [BenchmarkComponent], - imports: [CommonModule, GfValueModule, NgxSkeletonLoaderModule], + imports: [ + CommonModule, + GfValueModule, + MatTableModule, + NgxSkeletonLoaderModule + ], schemas: [CUSTOM_ELEMENTS_SCHEMA] }) export class GfBenchmarkModule {}