schiehll / react-alert

alerts for React
MIT License
607 stars 99 forks source link

Multiple templates #157

Closed the133448 closed 4 years ago

the133448 commented 4 years ago

The template react-alert-template-mui is great however I am unable to utilise the existing positions as it is more a modal box now than a alert. I'd still like to be able to use the existing template and the material template but unsure how to accomplish this. I.e. I'd like to declare 1 alert which shows up in the bottom right with a normal timeout whilst also having another alert which is the material one with a header and buttons to confirm.

besLisbeth commented 4 years ago

You can create the wrapper for react-alert-template-mui, to show it for one type of alert, and use another (maybe custom) template for another type of alert. Also, it's possible to pass options directly to alert, so there will be independent timeout and position