-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose Msg with Msg(...) #4
Comments
Hello Gabriel! I'm a bit reluctant about exposing the whole Maybe I can expose some helper functions like Would that help with what you are trying to achieve? |
Hi @pablen!, I ended creating those helpers functions, and I think it is ok. I was trying to create my own toast component which was just exactly as yours but without having to pass the config record to each function. Here you can see the code and how I exposed those helper functions. If you think there is an approach better to achieve the same thing, please let me know it :) |
Oh, so I think I misunderstood what you were trying to do here. In your case I think those helper functions are a bit redundant because you can use the You can take a look at the demo code, you'll notice I'm using those types in such a way: Lines 50 to 61 in e8c0a8f
Also, look a few lines above how I defined a single Lines 37 to 39 in e8c0a8f
I think you'll be good to go with this! |
I'm writing a component based on your component and I need that your component expose
Msg
asMsg(..)
as is explained in this issue elm/error-message-catalog#215The text was updated successfully, but these errors were encountered: