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

Using a modifier for flash-message component

Offen
#344 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
355
Forks
118
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.