diff --git a/projects/observability/src/shared/components/bar-gauge/bar-gauge.component.scss b/projects/observability/src/shared/components/bar-gauge/bar-gauge.component.scss index afb565520..ae27b3d56 100644 --- a/projects/observability/src/shared/components/bar-gauge/bar-gauge.component.scss +++ b/projects/observability/src/shared/components/bar-gauge/bar-gauge.component.scss @@ -1,17 +1,35 @@ @import 'mixins'; .bar-gauge { - .title { - @include overline($gray-7); - padding-bottom: 24px; - } + .header-data { + &.regular { + .title { + @include overline($gray-7); + padding-bottom: 24px; + } - .count { - @include subtitle-1($gray-9); - padding-bottom: 8px; + .count { + @include subtitle-1($gray-9); + padding-bottom: 8px; - .units { - @include body-small($gray-5); + .units { + @include body-small($gray-5); + } + } + } + + &.compact { + display: flex; + flex-direction: row; + justify-content: space-between; + + .title { + @include body-2-medium($gray-7); + } + + .count { + @include body-2-regular($gray-5); + } } } diff --git a/projects/observability/src/shared/components/bar-gauge/bar-gauge.component.ts b/projects/observability/src/shared/components/bar-gauge/bar-gauge.component.ts index 623aa3cd0..9bc296748 100644 --- a/projects/observability/src/shared/components/bar-gauge/bar-gauge.component.ts +++ b/projects/observability/src/shared/components/bar-gauge/bar-gauge.component.ts @@ -24,10 +24,12 @@ import { changeDetection: ChangeDetectionStrategy.OnPush, template: `
-
{{ this.title | htDisplayTitle }}
-
- {{ this.totalValue | number }} / {{ this.maxValue | number }} - {{ this.units }} +
+
{{ this.title | htDisplayTitle }}
+
+ {{ this.totalValue | number }} / {{ this.maxValue | number }} + {{ this.units }} +
@@ -45,7 +47,7 @@ import {
-
+
{{ segment.value | number }} @@ -79,6 +81,9 @@ export class BarGaugeComponent implements OnChanges, AfterViewInit { @Input() public segments?: Segment[] = []; + @Input() + public display: BarGaugeStyle = BarGaugeStyle.Regular; + public barSegments: BarSegment[] = []; public totalValue: number = 0; public overMaxValue: boolean = false; @@ -148,3 +153,8 @@ export interface Segment { interface BarSegment extends Segment { percentage: number; } + +export const enum BarGaugeStyle { + Regular = 'regular', + Compact = 'compact' +}