UNPKG

sweetalert2

Version:

A beautiful, responsive, customizable and accessible (WAI-ARIA) replacement for JavaScript's popup boxes, supported fork of sweetalert

36 lines (31 loc) 657 B
import * as dom from '../utils/dom/index' export { getContainer, getPopup, getTitle, getContent, getImage, getIcons, getCloseButton, getButtonsWrapper, getActions, getConfirmButton, getCancelButton, getFooter, getFocusableElements, isLoading } from '../utils/dom/index' /* * Global function to determine if swal2 popup is shown */ export const isVisible = () => { return !!dom.getPopup() } /* * Global function to click 'Confirm' button */ export const clickConfirm = () => dom.getConfirmButton().click() /* * Global function to click 'Cancel' button */ export const clickCancel = () => dom.getCancelButton().click()