Files
threshold-ui/ui/admin/app/components/copyable/index.hbs
T

31 lines
664 B
Handlebars

<span
id={{this.id}}
class="copyable"
{{did-insert this.register}}
{{will-destroy this.destroy}}
>
{{#if this.copied}}
<mark class="copyable-content">
{{yield}}
</mark>
{{else}}
<span class="copyable-content">
{{yield}}
</span>
{{/if}}
{{#if this.isClipboardLibrarySupported}}
<Rose::Button
id={{this.copyableButtonId}}
aria-describedby={{this.id}}
class="copyable-button"
@style="ghost"
@iconOnly={{if this.copied this.successIcon this.actionIcon}}
title={{if this.copied this.successText this.actionText}}
>
{{this.actionText}}
</Rose::Button>
{{/if}}
</span>