open-vault/ui/app/templates/components/hover-copy-button.hbs
Angel Garbarino 999503c0b5
Glimmer continued (#15786)
* generated item list

* home link glimmerization

* hover copy button

* clean up

* clean up

* copy change
2022-06-03 18:34:42 -06:00

19 lines
726 B
Handlebars

<div class={{if this.alwaysShow "hover-copy-button-static" "hover-copy-button"}} data-test-hover-copy>
<ToolTip @onClose={{action (mut this.tooltipText) "Copy"}} as |T|>
<T.Trigger data-test-tooltip-trigger tabindex="-1">
<CopyButton
data-test-hover-copy-button
class="copy-button button is-compact is-transparent"
@clipboardText={{this.copyValue}}
@success={{action (mut this.tooltipText) "Copied!"}}
>
<Icon @name="clipboard-copy" aria-label="Copy" />
</CopyButton>
</T.Trigger>
<T.Content @defaultClass="tool-tip">
<div class="box" data-test-hover-copy-tooltip-text>
{{this.tooltipText}}
</div>
</T.Content>
</ToolTip>
</div>