To run a test, type and choose the first corresponding test
npm run cypress:open
Example of usage
Extract utility method initializeToastify from the lib
Call this method and destruct toast-generating methods
Extract ToastContainer-component to create a list of toasts
If you want, write your custom method to create a toast (in this example it's a method notify)
Once you created this function, call it wherever you want with additional config
// example in App.tsximport{initializeToastify,ToastContainer}from'react-toast-lib';const{ generateToast }=initializeToastify();// it creates an instance of ToastServiceconstApp=()=>{constnotify=()=>generateToast({animationType: 'flip',lifetime: 3000,content: 'Test toast',position: {right: '1rem',top: '0.5rem',},});return(<><buttononClick={notify}>Notify</button><ToastContainer/></>);};exportdefaultApp;