-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
feat: added messageStylePrefix variable #335
feat: added messageStylePrefix variable #335
Conversation
btw! I am participating in hacktoberfest this year so I would much appreciate it if this pull request could have the |
Any interest in merging this @sbatson5 ? It's a requirement for me to not need to use a custom flash component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry it took me so long to get back to you. I thin this is a useful change. Just a couple comments around naming and quality of life
Thanks @sbatson5 those are all great suggestions, implemented them all EDIT: except for the dev warning |
Enable the ability to not use the generic bootstrap or foundation class names, by adding
flashTypePrefix
messageStylePrefix
which provides a way for the user to specify the flash type class name prefix.Backwards compatibility is maintained with
messageStyle
, but ifflashTypePrefix
messageStylePrefix
is set it will take priority.would produce an element like
Rationale
I've been running a custom flash-message component for this addon for a while now, because;
alert
andalert-box
are very overused and poorly scoped in our 15-20 frontend apps... we really needed to avoid using these class names, and this addon didn't provide a way to customize that (without resorting to a custom component)I noticed that with v2.0.0 the component has been updated to be tagless, render modifiers etc so I thought I would contribute some of my workings back to the project, with the aim of being able to use the component in this addon again!