open-nomad/ui/app/templates/components/copy-button.hbs
Buck Doyle 244157786a
Add explicit this to templates (#8388)
This is the result of running the no-implicit-this-codemod, some manual fixes,
and the addition of a linting rule to prevent future ambiguity.
2020-07-09 15:19:07 -05:00

22 lines
727 B
Handlebars

{{#if (eq this.state 'success')}}
<div class='button is-borderless is-small is-static'>
<span class="tooltip text-center always-active" role="tooltip" aria-label="Copied!">
{{x-icon 'copy-success'}}
</span>
</div>
{{else if (eq this.state 'error')}}
<div class='button is-borderless is-small is-static'>
<span class="tooltip text-center" role="tooltip" aria-label="Error copying">
{{x-icon 'alert-triangle'}}
</span>
</div>
{{else}}
<AddonCopyButton
@class="button is-borderless is-small"
@clipboardText={{this.clipboardText}}
@success={{perform this.indicateSuccess}}
@error={{action (mut this.state) "error"}}
>
{{x-icon 'copy-action'}}
</AddonCopyButton>
{{/if}}