From 90fa4a8f778fa5827bb394f0df5ce865d6738d8a Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Tue, 4 Apr 2023 11:42:06 +0900 Subject: [PATCH] Make fiat component color class customizable --- frontend/src/app/fiat/fiat.component.html | 4 ++-- frontend/src/app/fiat/fiat.component.scss | 3 --- frontend/src/app/fiat/fiat.component.ts | 3 ++- 3 files changed, 4 insertions(+), 6 deletions(-) delete mode 100644 frontend/src/app/fiat/fiat.component.scss diff --git a/frontend/src/app/fiat/fiat.component.html b/frontend/src/app/fiat/fiat.component.html index 00dd1250a..afee30d27 100644 --- a/frontend/src/app/fiat/fiat.component.html +++ b/frontend/src/app/fiat/fiat.component.html @@ -1,4 +1,4 @@ - + {{ ( (blockConversion.price[currency] > -1 ? blockConversion.price[currency] : null) ?? @@ -8,7 +8,7 @@ - + {{ (conversions[currency] > -1 ? conversions[currency] : 0) * value / 100000000 | fiatCurrency : digitsInfo : currency }} \ No newline at end of file diff --git a/frontend/src/app/fiat/fiat.component.scss b/frontend/src/app/fiat/fiat.component.scss deleted file mode 100644 index 843bd58b6..000000000 --- a/frontend/src/app/fiat/fiat.component.scss +++ /dev/null @@ -1,3 +0,0 @@ -.green-color { - color: #3bcc49; -} diff --git a/frontend/src/app/fiat/fiat.component.ts b/frontend/src/app/fiat/fiat.component.ts index 909b249c0..93752039b 100644 --- a/frontend/src/app/fiat/fiat.component.ts +++ b/frontend/src/app/fiat/fiat.component.ts @@ -6,7 +6,7 @@ import { StateService } from '../services/state.service'; @Component({ selector: 'app-fiat', templateUrl: './fiat.component.html', - styleUrls: ['./fiat.component.scss'], + styleUrls: [], changeDetection: ChangeDetectionStrategy.OnPush, }) export class FiatComponent implements OnInit, OnDestroy { @@ -17,6 +17,7 @@ export class FiatComponent implements OnInit, OnDestroy { @Input() value: number; @Input() digitsInfo = '1.2-2'; @Input() blockConversion: Price; + @Input() colorClass = 'green-color'; constructor( private stateService: StateService,