diff --git a/docs/handle-autoclose.md b/docs/handle-autoclose.md index 36bee52..8d8e3ce 100644 --- a/docs/handle-autoclose.md +++ b/docs/handle-autoclose.md @@ -25,14 +25,12 @@ import React from 'react'; import { ToastContainer, toast } from 'react-toastify'; function Example() { - const closeAfter15 = () => toast("Will close after 15s", { autoClose: 15000 }); - - const closeAfter7 = () => toast("Will close after 7s", { autoClose: 7000 }); + const closeAfter = (duration) => toast(`Will close after ${duration}s`, { autoClose: duration }); return (