Skip to content

mayyyc/react-alert-template-mui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-alert-template-mui

Installation

npm install react-alert-template-mui

Demo

Edit react-alert-template-mui example

How to Use

Simple alert

alert.show("Oh look, an alert!");

Alert with title

alert.show("This is an alert with title!", {
  title: "Random Alert Title",
});

Change copy on close button

alert.show("This is an alert with title!", {
  title: "Random Alert Title",
  closeCopy: "Cancel",
});

Alert with extra actions

alert.show("This is an alert with extra actions!", {
  title: "Alert with extra actions!",
  actions: [
    {
      copy: "Do something",
      onClick: () => setAction("Actioned!"),
    },
  ],
});