1.0.2 • Published 6 years ago

popup-layer v1.0.2

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

popup-layer

About

Popup-layer is a pop-up plugin,it exposes a base class outwards, which means that you can completely customize attributes and methods by instantiating them.Popup-layer is written through native JS, independent of the third party library.

Install

npm install popup-layer

Import

import popup from 'popup-layer';

Instantiation

Popup-layer provides a static method to customize configuration.

// here is a simple example
popup.open({
	title: 'Title',
	content: 'Hello Popup-Layer!',
});

Properties

  • title {string}: message header
  • content {string}: message content
  • time {number}: popup-layer auto shut down time(millisecond)
  • popupHeader {object}: custom message header styles
  • popupContent {object}: custom message content styles
  • popupFooter {object}: custom message footer styles

In addition, you can directly copy popup-layer styles, such as fontSize:'16px'

Methods

  • btnCancel: callback method for cancel button
  • btnClose: callback method for close button
  • btnOk: callback method for ok button

GitHub address

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

7 years ago