GA-MO / react-confirm-alert

react component confirm dialog.
https://ga-mo.github.io/react-confirm-alert/demo/
MIT License
271 stars 105 forks source link

No alert opening #73

Closed vocthor closed 2 years ago

vocthor commented 2 years ago

no alert pops, but instead its content (title, buttons, ...) appears at the bottom of the page. Am I missing something ? I haven't implemented the CSS part yet btw

const confirmDelete = (a) => {
    confirmAlert({
      title: "Confirm to submit",
      message: "Are you sure to do this.",
      buttons: [
        {
          label: "Yes",
          onClick: () => deleteAnnonce(a),
        },
        {
          label: "No",
          onClick: () => {},
        },
      ],
    });
  };

and

<button onClick={() => confirmDelete(a)}>Supprimer</button>
vocthor commented 2 years ago

ok mb, the CSS is mandatory, sorry