Alert API
API documentation for the React Alert component. Learn about the available props.
Import
import { Alert } from 'repopup';
Props
| Prop | Type | Description | Default |
|---|---|---|---|
| closeOnBackdropClick | boolean | Wheather or not to close the popup on clicking the backdrop | true |
| confirmButtonText | string | Use this to change the text on the "Confirm"-button. | 'Confirm' |
| denyButtonText | string | Use this to change the text on the "Deny"-button. | 'Deny' |
| variant | success| error| info| warning| question| null | varinat of a icon to be shown | null |
| onConfirm | React.MouseEventHandler<HTMLButtonElement> | undefined | Use this as a click handler for the "Confirm"-button | () => {} |
| onDeny | React.MouseEventHandler<HTMLButtonElement> | undefined | Use this as a click handler for the "Deny"-button. | () => {} |
| placement | 'top'| 'center' | 'bottom'| 'center-start'| 'bottom-start'| 'top-start'| 'top-end'| 'bottom-end'| 'center-end' | Use this to change Popup window position | center |
| showConfirmButton | boolean | If set to true, a "Confirm"-button will be shown. | false |
| showDenyButton | boolean | If set to true, a "Deny"-button will be shown. | false |
| subtitle | string | Used for a description for the popup. | |
| title | string | Used for the title of the popup | |
| open | boolean | Boolean describing if the modal should be shown or not. | required |
| onRequestClose | Function | Function that will be run when the modal is requested to be closed | required |