confirmation-popover-component

    0.0.1 • Public • Published

    Confirmation Popover

    Popover confirmation component built on top of Popover.

    js popover confirmation component

    Installation

    $ npm install confirmation-popover-component
    

    Features

    • all the features of Popover / Tip

    Events

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

    API

    new ConfirmationPopover(msg, [title])

    Create a new popover with msg and optional title.

    var Confirmation = require('confirmation-popover');
    var confirm = new Confirmation('This action cannot be undone.', 'Delete tobi?');
    confirm.show(el);

    ConfirmationPopover#focus(type)

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

    ConfirmationPopover#cancel(text)

    Set cancel button text.

    ConfirmationPopover#ok(text)

    Set cancel ok text.

    ConfirmationPopover#show(el, [fn])

    Attach to el, and invoke fn with a boolean representing the user's choice.

    When fn is omitted you may still utilize the cancel / ok events.

    ...

    View Tip and Popover for additional API documentation.

    License

    MIT

    Install

    npm i confirmation-popover-component

    DownloadsWeekly Downloads

    0

    Version

    0.0.1

    License

    none

    Last publish

    Collaborators

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