GA-MO / react-confirm-alert

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

whyy always append alert to body. #3

Closed Amara-Balakrishna1 closed 6 years ago

Amara-Balakrishna1 commented 7 years ago

can we add id of the parent container to which the alert should be added to.

createElemetReconfirm -> document.body.appendChild(divTarget);

confirmAlert({ **parentId: '***' // some id where should it host** title: 'Confirm to submit', // Title dialog message: 'Are you sure to do this.', // Message dialog childrenElement: () =>

Custom UI
, // Custom UI or Component confirmLabel: 'Confirm', // Text button confirm cancelLabel: 'Cancel', // Text button cancel onConfirm: () => { console.log('a'); } });

GA-MO commented 6 years ago

@Amara-Balakrishna1 I think the Confirm alert should be top layer.