import React, { useState } from 'react'; import toast, { Toaster } from './index'; let count = 0 function App() { const click = () => { const promise = new Promise((res, rej) => { if (Math.random() < 0.85) { setTimeout(res, 1000); } else { setTimeout(rej, 3000); } }); count++ toast.success(`Hello world ${count}`, { duration: 10000, TOAST_LIMIT: 2 }); // toast.promise( // promise, // { // loading: 'Preparing toast', // error: 'Whoops, it burnt', // success: `Here's your toast ${count}`, // }, // { // style: { // width: '200px', // paddingRight: '10px', // }, // } // ); // count++ // toast.promise( // promise, // { // loading: 'Preparing toast', // error: 'Whoops, it burnt', // success: "Here's your toast", // }, // { // style: { // width: '200px', // paddingRight: '10px', // }, // } // ); }; return (