2.0.0 • Published 4 years ago

modal-bajs v2.0.0

Weekly downloads
12
License
MIT
Repository
github
Last release
4 years ago

📦 Modal BaJS

Installation

npm install notify-bajs

Usage

import ModalBaJS from "modal-bajs";

const modal = ModalBaJS({
  content: "<h1>Hello world</h1>"
});

Methods

show()

Manually opens a modal

modal.show();

hide()

Manually hides a modal

modal.hide();

setContent()

modal.setContent("<b>New content here</b>");

update()

Manually update options a modal

modal.update({
  animation: "slideup",
  maxWidth: 300,
  closable: false
});

Optional parameters

  • animation: (string) - popup sideup (default: popup)
  • classContainer: (string) - Customized CSS class
  • content: (string) - Content of the modal
  • mask: (boolean) - Whether show mask or not (default: true)
  • closable: (boolean) - Whether a close (x) button is visible on top right of the modal dialog or not (default: true)
  • maskClosable: (boolean) - Whether to close the modal dialog when the mask (area outside the modal) is clicked (default: true)
  • escClosable: (boolean) - Whether support press esc to close (default: true)
  • maxWidth: (number) - Width of the modal dialog
2.0.0

4 years ago

1.0.7

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago