open-consul/ui-v2/app/components/feedback-dialog/index.hbs

12 lines
519 B
Handlebars

<div {{ref this '$feedback'}} class="with-feedback" ...attributes>
{{yield}}
{{#if (eq state 'success') }}
<YieldSlot @name="success" @params={{block-params transition}}>{{yield}}</YieldSlot>
{{else if (eq state 'error') }}
<YieldSlot @name="error" @params={{block-params transition}}>{{yield}}</YieldSlot>
{{/if}}
{{#if (or permanent (eq state 'ready')) }}
<YieldSlot @name="action" @params={{block-params success error}}>{{yield}}{{message}}</YieldSlot>
{{/if}}
</div>