Confirm
A set of modal boxes simulating system message box, mainly for confirm operations.
Basic usage
Confirm is used to ask users' confirmation.
API
Options
| Name | Description | Type | Default |
|---|---|---|---|
| title | title of the MessageBox | string | '' |
| message | content of the MessageBox | string | '' |
| submitText | submit button text | string | Cancel |
| cancelText | cancel button text | string | OK |
| submit | MessageBox closing callback if you don't prefer Promise | Function | '' |
| cancel | MessageBox closing callback if you don't prefer Promise | Function | '' |
| teleport | set the root element for the message box | string | HTMLElement | body |
| lockScroll | whether to lock body scroll when MessageBox prompts | boolean | true |