adopted-ember-addons / adopted-ember-addons/ember-cli-flash

Using a modifier for flash-message component

未关闭
#344 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
355
派生
118
PR 合并指标
30 天内没有已合并 PR

描述

Would there be any interest in moving the current flash logic from the flash-message component, into a modifier?

Thinking it could be (somewhat) backwards compatible, the current flash-message component would end up looking like this;
```hbs
// flash-message.hbs


{{#if hasBlock}}
{{yield this @flash (action "onClose")}}
{{else}}
{{@flash.message}}

{{/if}}

```

It would also allow users of this addon to make custom flash components with relative ease if they wish to do so, without having to implement all of the logic from the flash message component.

```hbs
{{#each flashMessages.queue as |flash|}}

wow, that's all I have to do, don't even need a component

{{/each}}
```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。