yesno-dialog

0.2.1 • Public • Published

Javascript yes no dialog

Build status License

Tiny customizable vanilla js confirm dialog

Install

npm install --save yesno-dialog

Usage

import yesno from "yesno-dialog";
 
showCatButton.addEventListener('click', async () => {
  const yes = await yesno()
  if (yes) // show the cat
})

Js yes no dialog example

Customization

import yesno from "yesno-dialog";
 
showCatButton.addEventListener('click', async () => {
  const yes = await yesno({
    labelYes: "Yep",
    labelNo: "Nope",
    bodyText: "Sure?"
  })
  if (yes) // show the cat
})
.jsyesnodialog {
  --color: #e91e63;
}

Js yes no dialog customize

Codesandbox examples

License

MIT © SidKH

Package Sidebar

Install

npm i yesno-dialog

Weekly Downloads

6,354

Version

0.2.1

License

MIT

Unpacked Size

209 kB

Total Files

15

Last publish

Collaborators

  • asidorenko