react-nextjs-toast
react-nextjs-toast copied to clipboard
Showing title anyhow
What is mostly expected
To only show the title if given. Otherwise it better to show only the message.
What is now happening
It showing a title anyway if we don't even give a title. On that purpose it is picking one by type config. Which is probably not the case for most user
What we can do
- Don't show title if not given
- Don't show title if not given or blank given
- Show title like current one by picking it from config according to notification type given but give another config option to do
showTitle
false or true. If false it will no show title.
How I can help
I have explore your code and understand properly that I can do this change. I have already done for my own project. For now it just not showing title when there is a blank title on option or not given one. But before doing a pull request here I am asking your permission and suggestion ( I have given 3 suggestion above. Suggest if you have any other on mind )
Got your suggestions. I would say showTitle would be irrelevant because if title is given that only tells the tooltip to show title other wise it won't show it. Also thanks for adding improvement, I will review it asap.