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

Using a modifier for flash-message component

Đang mở
#344 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
355
Fork
118
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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}}
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.