-
Notifications
You must be signed in to change notification settings - Fork 78
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
Passing type prop ('success', 'error', 'info' etc) to showNotification #37
Comments
Hey @albertkai , I created a pull request showing how to achieve what you are looking for. You can take a look here. Hope it helps 🤓 |
Hi @VitaliiK91 , I think the documentation might be wrong, as passing additionalProps={{ type: 'error' }} will result in an error. That being said, the PR you created with instructions on how to use it does not match the documentation in the readme anyways, and trying to use it that way yields no results. Any help would be appreciated, thanks! |
@DrySoldier what type of error are you getting? Could you share the code snippet? As you can see in PR comments, the merged code is slightly different and README has the proper instructions, basically passProps has been renamed to additionalProps |
@VitaliiK91 your readme has this
and if you look at the
and the notification doesn't change in color or style whatsoever. There is no error either. It would be great if you could update the Readme with the right structure and (maybe?) one other example with all the options passed in so we understand how extensible it is. |
@stonebinox Hi, yes you absolutely correct, I will open a new PR for README fix. As for color or style change I am not sure what you mean? This prop will just pass additional props to the |
@VitaliiK91 actually i figured out the |
@stonebinox Glad it worked for you. Yeah I opened a PR with a README fix, hopefully that would help! Cheers! |
Got any ideas on how i can pass additional props to showNotification function, in order to be able to customise the appearance, depending on the notification type. For example, i want to show green background for success notifications, and red for error etc.
The text was updated successfully, but these errors were encountered: