Browse Source

Refactor value component

pull/767/head
Thomas 3 years ago
parent
commit
e01577d5ab
  1. 6
      libs/ui/src/lib/value/value.component.html
  2. 4
      libs/ui/src/lib/value/value.component.ts

6
libs/ui/src/lib/value/value.component.html

@ -43,13 +43,15 @@
</div>
</ng-container>
</div>
<div *ngIf="label && size === 'large'">
<ng-container *ngIf="label">
<div *ngIf="size === 'large'">
{{ label }}
</div>
<small *ngIf="label && size !== 'large'">
<small *ngIf="size !== 'large'">
{{ label }}
</small>
</ng-container>
</ng-container>
<ngx-skeleton-loader
*ngIf="value === undefined"

4
libs/ui/src/lib/value/value.component.ts

@ -4,7 +4,7 @@ import {
Input,
OnChanges
} from '@angular/core';
import { DEFAULT_DATE_FORMAT } from '@ghostfolio/common/config';
import { DEFAULT_DATE_FORMAT, locale } from '@ghostfolio/common/config';
import { format, isDate, parseISO } from 'date-fns';
import { isNumber } from 'lodash';
@ -21,7 +21,7 @@ export class ValueComponent implements OnChanges {
@Input() isCurrency = false;
@Input() isPercent = false;
@Input() label = '';
@Input() locale = 'en-US';
@Input() locale = locale;
@Input() position = '';
@Input() precision: number | undefined;
@Input() size: 'large' | 'medium' | 'small' = 'small';

Loading…
Cancel
Save