1.1.0 • Published 8 years ago
ios-confirm v1.1.0
ios-confirm
An ios-like confirm based on Promise.

install
yarn add ios-confirmusage
- import:
import confirm from 'ios-confirm'- use it like promise:
$('button').addEventListener('click', () => {
confirm('test', 'content goes here').then(() => {
// confirmed
}, () => {
// cancled
})
})3.for more info to customize:
confirm('id', {
title: 'Confirm Your In-App Purchase',
subtitle: 'Do you want to buy one pack of 100 Bux for $0.69?',
cancle: 'Cancel',
confirm: 'Buy',
}).then(() => {
// confirmed
}, () => {
// cancled
})todo
- i18n / customize
- decoupling
- CSS Modules
contributing
- Fork it!
- Create your feature branch:
git checkout -b MY-NEW-FEATURE - Commit your changes:
git commit -am 'ADD SOME FEATURE' - Push to the branch:
git push origin MY-NEW-FEATURE - Submit a pull request :D