ios-confirm
v1.1.0
Published
An ios-like confirm
Downloads
3
Readme
ios-confirm
An ios-like confirm based on Promise.
install
yarn add ios-confirm
usage
- 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
- [x] i18n / customize
- [x] 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