mirror of
https://github.com/discourse/discourse.git
synced 2024-12-20 00:13:56 +08:00
48193767bf
Automatically generated by `eslint --fix` to satisfy the updated configuration
28 lines
845 B
JavaScript
28 lines
845 B
JavaScript
import Component from "@glimmer/component";
|
|
import { on } from "@ember/modifier";
|
|
import { inject as service } from "@ember/service";
|
|
import concatClass from "discourse/helpers/concat-class";
|
|
|
|
export default class DToasts extends Component {
|
|
@service toasts;
|
|
|
|
<template>
|
|
<div class="fk-d-toasts">
|
|
{{#each this.toasts.activeToasts as |toast|}}
|
|
<div
|
|
role={{if toast.options.autoClose "status" "log"}}
|
|
key={{toast.id}}
|
|
class={{concatClass "fk-d-toast" toast.options.class}}
|
|
{{(if toast.options.autoClose (modifier toast.registerAutoClose))}}
|
|
{{on "mouseenter" toast.cancelAutoClose}}
|
|
>
|
|
<toast.options.component
|
|
@data={{toast.options.data}}
|
|
@close={{toast.close}}
|
|
/>
|
|
</div>
|
|
{{/each}}
|
|
</div>
|
|
</template>
|
|
}
|