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

Using a modifier for flash-message component

Abierto
#344 0 comentarios 1 reacción 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
355
Forks
118
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.