/yesno-dialog

Tiny js yes no dialog

Primary LanguageJavaScriptMIT LicenseMIT

Javascript yes no dialog

Build status License Code style prettier

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