jenesius-vue-modal
Version:
The progressive and simple modal system for Vue.js v3
13 lines (12 loc) • 611 B
TypeScript
import Modal, { ModalOptions } from "../utils/Modal";
import { WrapComponent } from "../utils/types";
/**
* @description OpenModal that was provided as component.
* Before opening try to close all previous modals.
* @param {Object} component Any Vue component
* @param {Object} props Props that will be passed to the component
* @param {Object} options Params for Modal. Like backgroundClose and other
*
* @return {Promise<Modal>} ModalObject
*/
export default function openModal<P extends WrapComponent>(component: P | string, props?: any, options?: Partial<ModalOptions>): Promise<Modal>;