Files
nomad/ui/app/components/conditional-link-to.hbs
Phil Renaud 15b06e8505 [ui] HashiCorp Design System upgraded to 3.6.0 (#19872)
* HashiCorp Design System upgraded to 3.6.0

* Fresh yarn

* Responses out of range are brought back within

* General pass at a11y fixes with updated components and node

* Further tooltip updates

* 3 more partitions worth of toggle and tooltip updates

* scale-events-accordion and topo-viz node fixes
2024-02-07 16:08:41 -05:00

33 lines
814 B
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}
{{#if @condition}}
{{#if @tooltip}}
<LinkTo @route={{@route}} @model={{@model}} @query={{this.query}} class={{@class}} aria-label={{@label}}
{{hds-tooltip @tooltip.text options=@tooltip.extraTippyOptions}}
>
{{yield}}
</LinkTo>
{{else}}
<LinkTo @route={{@route}} @model={{@model}} @query={{this.query}} class={{@class}} aria-label={{@label}}>
{{yield}}
</LinkTo>
{{/if}}
{{else}}
{{#if @tooltip}}
<Hds::TooltipButton
@text={{or @tooltip.text ""}}
@extraTippyOptions={{@tooltip.extraTippyOptions}}
>
<span class={{@class}}>
{{yield}}
</span>
</Hds::TooltipButton>
{{else}}
<span class={{@class}}>
{{yield}}
</span>
{{/if}}
{{/if}}