confirmation-component

0.0.1 • Public • Published

Confirmation

Confirmation component with structural styling to give you a clean slate. Built on the Dialog component.

js confirmation component confirm

Installation

$ npm install confirmation-component

Features

  • events for composition
  • structural CSS letting you decide on style
  • overlay, modal, escapable etc from Dialog
  • fluent API

Events

  • show the confirmation is shown
  • hide the confirmation is hidden
  • cancel the user closed the confirmation or cancelled
  • ok the user accepted

API

confirm(msg)

Display a confirmation dialog with a msg only.

confirm(title, msg)

Display a confirmation dialog with title and msg.

Confirmation#focus(type)

By default the "cancel" button is focused, however you may invoke .focus('ok').

Confirmation#cancel(text)

Set cancel button text.

Confirmation#ok(text)

Set cancel ok text.

Confirmation#show([fn])

Show the confirmation and invoke fn with a boolean representing the user's choice.

View the Dialog API for additional methods such as .modal(), .closable() etc.

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i confirmation-component

Weekly Downloads

3

Version

0.0.1

License

none

Last publish

Collaborators

  • defunctzombie
  • dfcreative
  • tjholowaychuk
  • jongleberry
  • dominicbarnes
  • tootallnate
  • rauchg
  • retrofox
  • coreh
  • forbeslindesay
  • kelonye
  • mattmueller
  • yields
  • anthonyshort
  • ianstormtaylor
  • cristiandouce
  • swatinem
  • stagas
  • amasad
  • juliangruber
  • calvinfo
  • blakeembrey
  • timoxley
  • jonathanong
  • queckezz
  • nami-doc
  • clintwood
  • thehydroimpulse
  • stephenmathieson
  • trevorgerhardt
  • timaschew
  • hughsk