Confirmation notification component with a clean slate to build off of.
$ component install component/confirmation-notification
- all the features of notification
close
the notification is closed via the Xclick
the notification is clickedcancel
the user closed the notification or cancelledok
the user accepted
var notify = require('confirmation-notification');
notify('Accept friend request?', function(yes){
alert(yes ? 'wahoo' : 'nope');
})
Notify with the given msg
and no title. If a
function is given it will be invoked with a boolean
representing the user's choice.
Notify with the given msg
and title
. If a
function is given it will be invoked with a boolean
representing the user's choice.
By default the "cancel" button is focused, however you
may invoke .focus('ok')
.
Set cancel button text
.
Set cancel ok text
.
Show the notification and invoke fn
with
a boolean representing the user's choice.
When fn
is omitted you may still utilize the cancel
/ ok
events.
MIT