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

30 lines
664 B
Handlebars
Raw Normal View History

2021-02-02 17:12:47 -05:00
<span
id={{this.id}}
class='copyable'
2021-02-02 17:12:47 -05:00
{{did-insert this.register}}
2021-03-05 17:27:00 -05:00
{{will-destroy this.tearDown}}
2021-02-02 17:12:47 -05:00
>
{{#if this.copied}}
<mark class='copyable-content'>
2021-02-02 17:12:47 -05:00
{{yield}}
</mark>
{{else}}
<span class='copyable-content'>
2021-02-02 17:12:47 -05:00
{{yield}}
</span>
{{/if}}
{{#if this.isClipboardLibrarySupported}}
<Rose::Button
id={{this.copyableButtonId}}
aria-describedby={{this.id}}
class='copyable-button'
@style='ghost'
2021-02-02 17:12:47 -05:00
@iconOnly={{if this.copied this.successIcon this.actionIcon}}
title={{if this.copied this.successText this.actionText}}
>
{{this.actionText}}
</Rose::Button>
{{/if}}
</span>