fkhadra / fkhadra/react-toastify

[Feature Request] Support callback function as autoClose value

Open
#769 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.