LouisBarranqueiro / reapop

:postbox: A simple and customizable React notifications system
https://louisbarranqueiro.github.io/reapop
MIT License
1.55k stars 78 forks source link

Using closeButton with a custom button #75

Closed trebaud closed 6 years ago

trebaud commented 6 years ago

Reapop version: 1.1.4 React version: 15.6.1 Redux version: 3.7.1

Hi, Is it possible to display the closeButton when using at least one custom button? According to the source I don't think it is but I might be wrong. If not would it be possible to add this feature?

I'm using a custom button as a redirect to a help page, that means I have to add another custom button in order to dismiss the notification. I guess that's fine. The problem is when I already have 2 custom buttons, i cannot add a third one as it doesn't display well.

Thank you.

LouisBarranqueiro commented 6 years ago

👋 @trebaud

If not would it be possible to add this feature?

I don't want to do that because it would be weird in terms of UI. Also having 4 kind of actions on a notification is I think too complicated. I don't want to do that.

The problem is when I already have 2 custom buttons, i cannot add a third one as it doesn't display well.

By default, a notification is not dismissible when it has at least one button, but in your case, It could be useful to make it dismissible. Would that work for you?

trebaud commented 6 years ago

Yes that would be great! Making it dismissible with at least one button would solve my problem. Thank you!

LouisBarranqueiro commented 6 years ago

you mean, making a notification dismissible no matter the number of buttons it has, right?

trebaud commented 6 years ago

Yes exactly!

LouisBarranqueiro commented 6 years ago

New version released! Let me know if it solves your issue.

trebaud commented 6 years ago

Thanks it works great!

Just to let you know I think you made a typo in the release notes guidelines for upgrading to the new version. The dismissible field should be set to true to make the notification dismissible but instead you wrote false.

LouisBarranqueiro commented 6 years ago

@trebaud

Thanks it works great!

Glad to hear that! 😄

Just to let you know I think you made a typo in the release notes guidelines for upgrading to the new version. The dismissible field should be set to true to make the notification dismissible but instead you wrote false.

You're right, thanks!