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

Using a modifier for flash-message component

Open
#344 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
355
Forks
118
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.