aforemny / aforemny/material-components-web-elm
Add `Snackbar.mapMessage : (msg1 -> msg2) -> Message msg1 -> Message msg2`
- Lingua principale
- Elm
- Stelle
- 93
- Fork
- 20
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Snackbar messages should be able to be mapped if a hierarchically lower component (msg1) fires a snackbar message handled by a hierarchically higher component (application, msg2).
The current design of `Snackbar.customIcon` makes this infeasible.
_As a work-around, do not dispatch `Snackbar.Message msg1` from the lower-component, but rather a relevant subset of `Snackbar.Message`, ie. `{ label : String, onActionIconClick : Maybe (Icon msg) }` that you can map yourself and only turn it into a snackbar message at the top-level._
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.