stmodal

Custom alert, confirm and popup

Usage no npm install needed!

<script type="module">
  import stmodal from 'https://cdn.skypack.dev/stmodal';
</script>

README

stMODAL

Custom alert, confirm and popup

  1. use "npm i stmodal" in your project.
  2. import "stmodal" at top of your index.
import "stmodel"

alert

when you use "alert('hello world')" you can see the result. Also you can pass a series of setting using "alert('hello world', [array settings])" to customize the alert

// example:
alert('hello world')

confirm

for confirm you can use "confirm('are you sure?', [your function])" where you can pass a function as result of confirmation. Also you can pass a series of setting using "confirm('are you sure?', [array settings], [your function])" to customize the confirm.

// example:
confirm( 'are you sure?', alert('You press confirm') )

popup

not impenent at moment