Skip to content

anthonyespirat/simple-toast-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

SIMPLE TOAST REACT

Instruction

Add div with id #toast
This div is in position: absolute, so don't forget to be relative to something else

ReactDOM.render(
  <React.StrictMode>
    <App />
    
    <div id="toast"></div>
  </React.StrictMode>,
  document.getElementById('root')
)
import triggerToast from '../lib/toast/triggerToast'

Usage

triggerToast(title, message, toastType, duration)

Exemple

triggerToast('Error', 'End of the world', 'error', 6000)

About

Trigger toast for React app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published