From 4cfb8e175544e4815b2726c1c694820aa5cabf20 Mon Sep 17 00:00:00 2001 From: Ayberk Baytok <45696854+Ayberkone@users.noreply.github.com> Date: Wed, 29 Mar 2023 16:47:28 +0300 Subject: [PATCH] Update handle-autoclose.md --- docs/handle-autoclose.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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 (