mirror of
https://github.com/status-im/consul.git
synced 2025-01-13 15:26:48 +00:00
f469da640e
* ui: Renames CopyButtonFeedback to CopyButton and use it everywhere * Uncapitalize output * Remove the ability to set the contents via an attr, and.. ..change the attribute for the string that gets copied to be called 'value' so it feels like HTML
18 lines
661 B
Handlebars
18 lines
661 B
Handlebars
<FeedbackDialog @type="inline">
|
|
<BlockSlot @name="action" as |success error|>
|
|
<Ref @target={{this}} @name="success" @value={{success}} />
|
|
<Ref @target={{this}} @name="error" @value={{error}} />
|
|
<button id={{guid}} title={{concat "Copy " name " to the clipboard"}} ...attributes type="button" class="copy-btn" data-clipboard-text={{value}}>{{~yield~}}</button>
|
|
</BlockSlot>
|
|
<BlockSlot @name="success" as |transition|>
|
|
<p class={{transition}}>
|
|
Copied {{name}}!
|
|
</p>
|
|
</BlockSlot>
|
|
<BlockSlot @name="error" as |transition|>
|
|
<p class={{transition}}>
|
|
Sorry, something went wrong!
|
|
</p>
|
|
</BlockSlot>
|
|
</FeedbackDialog>
|