aforemny / aforemny/material-components-web-elm
Add `Snackbar.mapMessage : (msg1 -> msg2) -> Message msg1 -> Message msg2`
- Lenguaje dominante
- Elm
- Estrellas
- 93
- Forks
- 20
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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._
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.