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

30 lines
700 B
Handlebars

{{#if this.isClipboardLibrarySupported}}
<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}}
<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>
</span>
{{else}}
{{yield}}
{{/if}}