meilisearch-admin/app/components/toast.hbs
Stanislav Romanov cfdfbdfac8 Add progress-bar
2022-09-14 12:55:48 +03:00

20 lines
547 B
Handlebars

{{#in-element this.toasts.destinationElement insertBefore=null}}
<div
class='absolute w-full max-w-xs border rounded bg-base-7 shadow-sm'
role='alert'
style={{this.style}}
{{did-insert this.didInsert}}
...attributes
>
<div class='p-4'>
{{yield (hash triggerOnClose=this.triggerOnClose)}}
</div>
{{#if @autoClose}}
<ProgressBar
@duration={{this.autoCloseDuration}}
@onFinish={{this.triggerOnClose}}
class={{@closeIndicatorClass}}
/>
{{/if}}
</div>
{{/in-element}}