update confirm demo

This commit is contained in:
Eden Wang 2017-07-16 17:44:52 +08:00 committed by 乐仪
parent c712d072eb
commit f7b918add3

View File

@ -26,13 +26,35 @@ function showConfirm() {
},
onCancel() {
console.log('Cancel');
}
});
}
function showDeleteConfirm() {
confirm({
title: 'Are you sure delete this task?',
content: 'Some descriptions',
okText: 'Yes',
okType: 'danger',
cancelText: 'No',
cancelType: 'dashed',
onOk() {
console.log('OK');
},
onCancel() {
console.log('Cancel');
}
});
}
ReactDOM.render(
<Button onClick={showConfirm}>
Confirm
</Button>
<div>
<Button onClick={showConfirm}>
Confirm
</Button>
<Button onClick={showDeleteConfirm} type="dashed">
Delete
</Button>
</div>
, mountNode);
````