1.0.3 • Published 5 years ago

basic-popup v1.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

basic-popup

Plug n play easy to use popup creator for your website

Use example:

import popupJs from 'basic-popup';

...

class App extends Component {...

...

componentDidMount() {\ let popup = popupJs({"type":"sticky", // You can initialize the popup whenever you want\ "backgroundColor":"rgba(54, 161, 239, 1)",\ "showDuration":"1s",\ "closeDuration":"250ms",\ "vAlign":"center",\ "hAlign":"center",\ "height":"300px",\ "html":"<h1>POPUP</h1>"});

popup.show(); // You can show the popup whenever you want

//popup.close(); // You can close the popup whenever you want\ }

...

}

parameters:

type: sticky | sliding | fading\ backgroundColor: background color of popup\ overlayColor: overlay color of popup //optional(web site won't be disabled if there is no overlay color)\ showDuration: popup animation css duration for showing popup(can be in s or ms)\ closeDuration: popup animation css duration for closing popup(can be in s or ms)\ position: position for fading popup(top left | right center | center etc.)\ startPosition: start position for sliding popup(top left | right center | center etc.)\ endPosition: end position for sliding popup(start | center | end)\ vAlign: vertical alignment of html content inside the popup(top | center | bottom)\ hAlign: horizontal alignment of html content inside the popup(left | center | right)\ height: css height of popup(can be set to auto)\ width: css width of popup(can be set to auto)\ html: content of popup