Closed aligos closed 7 years ago
As per my experience with the module it seems to only support alerts.
Would be awesome though to support confirm as well as it is the best library for react around. I managed to do it like this:
let alerts = [];
alerts.push(this.props.alert.info(
<div>Are you sure?<br/>
<button className="btn confirm" onClick={() => {
this.props.alert.remove(alerts[0]);
}}>No
</button>
<button className="btn confirm danger" onClick={() => {
this.deleteStuff();
this.props.alert.remove(alerts[0]);
}}>Yes
</button>
</div>
));
i want to make confirm dialog ok and cancle with this alert