1.0.6 • Published 4 years ago

crelm-popup v1.0.6

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

crelm-popup

GitHUB

A small (<2kb), simple popup component with responsive design using the crelm library. Crelm is the only dependency.

Install:

npm i crelm-popup

Utilization:

let popup = require('crelm-popup')

popup(childrenElements:array, [closeOnBlurClick:boolean || false, maxWidth:number || 300])
let dialog 
dialog = popup([
  {tag: 'h1', text: 'Hello World'},
  {tag: 'input', type: 'button', value: 'Close Dialog', onclick: () => dialog.close()}
])
// you can readjust the maxWidth with the method below
dialog.setWidth(500)
// close the dialog with the method below
dialog.close()

You can apply additional styles with the below class names:

.c-popup {}
.c-blur {}

See crelm for more on the children elements.

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago