mirror of https://github.com/hashicorp/consul
32 lines
575 B
Handlebars
32 lines
575 B
Handlebars
{{!
|
|
Copyright (c) HashiCorp, Inc.
|
|
SPDX-License-Identifier: MPL-2.0
|
|
}}
|
|
|
|
{{#if @for~}}
|
|
<label
|
|
for={{@for}}
|
|
...attributes
|
|
>{{yield}}</label>
|
|
{{~else if @href~}}
|
|
{{~#if @external~}}
|
|
<a
|
|
href={{@href}}
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
...attributes
|
|
>{{yield}}</a>
|
|
{{~else~}}
|
|
<a
|
|
href={{@href}}
|
|
...attributes
|
|
>{{yield}}</a>
|
|
{{~/if~}}
|
|
{{~else~}}
|
|
<button
|
|
type={{or @type 'button'}}
|
|
{{on 'click' (optional @onclick)}}
|
|
tabindex={{@tabindex}}
|
|
...attributes
|
|
>{{yield}}</button>
|
|
{{~/if}} |