mirror of https://github.com/hashicorp/consul
18 lines
769 B
Handlebars
18 lines
769 B
Handlebars
<nav role="tablist" class="tab-nav">
|
|
<ul>
|
|
{{#each items as |item|}}
|
|
<li
|
|
data-test-tab={{concat name '_' (if item.label (slugify item.label) (slugify item))}}
|
|
class={{if (or item.selected (eq selected (if item.label (slugify item.label) (slugify item)))) 'selected'}}
|
|
>
|
|
<label role="tab" onkeydown={{action 'keydown'}} tabindex="0" aria-controls="radiogroup_{{name}}_{{if item.label (slugify item.label) (slugify item)}}_panel" for="radiogroup_{{name}}_{{if item.label (slugify item.label) (slugify item)}}" data-test-radiobutton="{{name}}_{{if item.label (slugify item.label) (slugify item)}}">
|
|
{{#if item.href }}
|
|
<a href={{item.href}}>{{item.label}}</a>
|
|
{{else}}
|
|
<a>{{ item }}</a>
|
|
{{/if}}
|
|
</label>
|
|
</li>
|
|
{{/each}}
|
|
</ul>
|
|
</nav> |