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

35 lines
739 B
Handlebars
Raw Normal View History

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: MPL-2.0
}}
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}}
2022-10-06 11:41:12 -04:00
</span>