vault/ui/app/components/clients/usage-stats.hbs
claire bontempo 17552aab7d
UI: Refactor and resuse UsageStats display template across tabs (#26562)
* refactor usage stats to use Hds::Card

* use usage stats in other tabs

* use flex row and remove verbose grid css classes

* cleanup selectors, add arg to usage stat selector

* update usage stat test

* update token tab usage stat title

* add test coverage for description and title
2024-04-19 22:14:46 +00:00

36 lines
958 B
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}
{{! Display only template that renders yielded components in columns, beneath a title and description }}
<Hds::Card::Container
@level="base"
@hasBorder={{true}}
data-test-usage-stats={{@title}}
class="has-padding-m has-bottom-margin-m"
>
<div class="flex row-wrap space-between">
<Hds::Text::Display @tag="h3" @weight="semibold" @size="400">
{{@title}}
</Hds::Text::Display>
<Hds::Link::Standalone
@href={{doc-link "/vault/tutorials/monitoring/usage-metrics"}}
@text="Usage metrics tutorial"
@icon="learn-link"
@iconPosition="trailing"
class="has-bottom-margin-s"
/>
</div>
{{#if @description}}
<Hds::Text::Body @tag="p">
{{@description}}
</Hds::Text::Body>
{{/if}}
<hr class="has-background-gray-100 has-bottom-margin-m" />
<div class="columns">
{{yield}}
</div>
</Hds::Card::Container>