fkhadra / fkhadra/react-toastify
[Feature Request] Support callback function as autoClose value
Open
Feature Request
- Dominant language
- TypeScript
- Stars
- 13.4k
- Forks
- 741
- PR merge metrics
- No merged PRs in 30d
Description
`autoClose` property for the Toast container is a number right now,
therefore I can't set a dynamic value to it depending on how long the text should be shown.
So basically, the property would change from
`autoClose?: number | false` to `autoClose?: ((message: ToastContent) => number | false) | number | false`
I want to receive at least the `ReactNode` of the toast message about to be shown and return the autoClose value in ms or false if neccessary.
Contributor guide
Assessment
This issue has not been assessed yet.