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

30 lines
664 B
Handlebars
Raw Normal View History

2020-10-05 12:35:07 -04:00
<span
id={{this.id}}
class='copyable'
2020-10-05 12:35:07 -04:00
{{did-insert this.register}}
2021-03-05 17:27:00 -05:00
{{will-destroy this.tearDown}}
2020-10-05 12:35:07 -04:00
>
2020-09-29 15:08:21 -04:00
2020-10-05 12:35:07 -04:00
{{#if this.copied}}
<mark class='copyable-content'>
2020-10-05 12:35:07 -04:00
{{yield}}
</mark>
{{else}}
<span class='copyable-content'>
2020-10-05 12:35:07 -04:00
{{yield}}
</span>
{{/if}}
{{#if this.isClipboardLibrarySupported}}
2020-09-29 15:08:21 -04:00
<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}}
2020-10-05 12:35:07 -04:00
>
{{this.actionText}}
</Rose::Button>
{{/if}}
</span>