consul/ui-v2/app/templates/components/copy-button-feedback.hbs
John Cowen 06d09d11f1
ui: Move slots to use attributes over positional params (#7032)
* Change all instances of yield/block-slots to use attributes over positional arguments

* Remove the ability to use yield/block-slots with positional params
2020-01-15 09:15:54 +00:00

16 lines
591 B
Handlebars

{{#feedback-dialog type='inline'}}
{{#block-slot name='action' as |success error|}}
{{#copy-button success=(action success) error=(action error) clipboardText=copy title=(concat 'Copy ' name ' to the clipboard')}}{{#if hasBlock }}{{yield}}{{else}}{{value}}{{/if}}{{/copy-button}}
{{/block-slot}}
{{#block-slot name='success' as |transition|}}
<p class={{transition}}>
Copied {{name}}!
</p>
{{/block-slot}}
{{#block-slot name='error' as |transition|}}
<p class={{transition}}>
Sorry, something went wrong!
</p>
{{/block-slot}}
{{/feedback-dialog}}