github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/app/templates/components/copy-button.hbs (about)

     1  {{#if (eq this.state 'success')}}
     2    <div class='button is-small is-static {{if @compact "is-compact"}} {{unless @border "is-borderless"}}'>
     3      <span class="tooltip text-center always-active" role="tooltip" aria-label="Copied!">
     4        {{x-icon 'copy-success'}}
     5      </span>
     6      {{yield}}
     7    </div>
     8  {{else if (eq this.state 'error')}}
     9    <div class='button is-small is-static {{if @compact "is-compact"}} {{unless @border "is-borderless"}}'>
    10      <span class="tooltip text-center" role="tooltip" aria-label="Error copying">
    11        {{x-icon 'alert-triangle'}}
    12      </span>
    13      {{yield}}
    14    </div>
    15  {{else}}
    16    <AddonCopyButton
    17      @class="button is-small {{if @compact "is-compact"}} {{unless @border "is-borderless"}}"
    18      @clipboardText={{this.clipboardText}}
    19      @success={{perform this.indicateSuccess}}
    20      @error={{action (mut this.state) "error"}}
    21      @title="Copy"
    22    >
    23      {{x-icon 'copy-action'}}
    24      {{yield}}
    25    </AddonCopyButton>
    26  {{/if}}