@deleteagency/modal
v2.1.0
Published
[Live Demo](https://delete-agency.github.io/modal/)
Downloads
28
Keywords
Readme
Modal
Motivation
TODO
Installation
Use the package manager npm for installation.
$ npm install @deleteagency/modal
Usage
you can import ready instance
import { modalService } from '@deleteagency/modal';
const modal = modalService.create('<div>I am a modal!</div>');
modal.open();
or you can import class and modify it for your project, and then use
import { ModalService } from '@deleteagency/modal';
class CustomModalService extend ModalService {
...
}
const myService = new customModalService();
Options
namespace
Type: String
Default: data-modal
TODO
API
Modal.create(content, options)
Returns new Modal instance
content
Required
Type: HTMLElement|String
options
Optional
Type: Object