Files
vault/ui/lib/core/addon/components/stat-text.hbs
claire bontempo 4cf7a4464f UI: add monthly new chart to sync clients tab (#26583)
* add monthly new sync counts to tab

* update tests

* update copy for token tab

* update token tab

* cleanup selector

* move copy
2024-04-22 14:55:07 -07:00

24 lines
752 B
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}
<div
class={{concat "stat-text-container " @size (unless @subText "-no-subText")}}
data-test-stat-text={{or @label "true"}}
...attributes
>
<div class="stat-label has-bottom-margin-xs">
{{@label}}
{{#if @tooltipText}}
<Hds::TooltipButton @text={{@tooltipText}} aria-label="more information about {{@label}}">
<FlightIcon @name="info" />
</Hds::TooltipButton>
{{/if}}
</div>
{{#if @subText}}
<div class="stat-text">{{@subText}}</div>
{{/if}}
{{! Ember reads 0 as falsy, so only render a dash if the value is truly undefined}}
<div class="stat-value">{{if (or @value (eq @value 0)) (format-number @value) "-"}}</div>
</div>