fkhadra / react-toastify

React notification made easy 🚀 !
https://fkhadra.github.io/react-toastify/introduction
MIT License
12.33k stars 676 forks source link

Feature/Added prop for passing function when close button is clicked #1118

Open sbsangu opened 1 month ago

sbsangu commented 1 month ago

Fixes

Summary

Added an onButtonClose prop to the Toast component to allow users to define a callback function that gets called when the close button of a toast is clicked. This enhancement improves the flexibility and usability of the toast component by allowing custom behavior to be executed when the close button is pressed.

Changes

Checklist

Additional Information

This feature allows users to pass a callback function that will be called when the toast's close button is clicked, enabling more custom and dynamic behaviors when a toast is dismissed.

sbsangu commented 1 month ago

Could you please let me know if this pull request resolves the issue? Additionally, do you think it is ready to be merged?