1.1.0 • Published 6 years ago

ios-confirm v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

ios-confirm

An ios-like confirm based on Promise.

npm.io

install

yarn add ios-confirm

usage

  1. import:
import confirm from 'ios-confirm'
  1. 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

  1. Fork it!
  2. Create your feature branch: git checkout -b MY-NEW-FEATURE
  3. Commit your changes: git commit -am 'ADD SOME FEATURE'
  4. Push to the branch: git push origin MY-NEW-FEATURE
  5. Submit a pull request :D
1.1.0

6 years ago

1.0.8

6 years ago

1.0.6

6 years ago

1.0.4

6 years ago

1.0.2

6 years ago

1.0.0

6 years ago