Click here to Skip to main content
15,880,392 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to change size of button in sweet alert?

What I have tried:

swal({
      title: `Are you sure to delete this news posted by ${news.users.user_name} ?`,
      text: `Once deleted, you will not be able to recover this post!`,
      icon: "warning",
      buttons: true,
      dangerMode: true,
    }).then(willDelete => {
      if (willDelete) {
        this.props.deleteNewsPosts(news._id)
      } else {
        swal(`This news is safe!`)
      }
    })
  } 
Posted
Updated 23-Dec-21 6:16am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900