chore(): update readme

This commit is contained in:
Manu Mtz.-Almeida
2018-10-08 15:44:51 -05:00
parent b4a73ad760
commit 4036db5480
42 changed files with 1966 additions and 215 deletions

View File

@ -35,11 +35,47 @@ refresher.
## Methods
| Method | Description |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cancel` | Changes the refresher's state from `refreshing` to `cancelling`. |
| `complete` | Call `complete()` when your async operation has completed. For example, the `refreshing` state is while the app is performing an asynchronous operation, such as receiving more data from an AJAX request. Once the data has been received, you then call this method to signify that the refreshing has completed and to close the refresher. This method also changes the refresher's state from `refreshing` to `completing`. |
| `getProgress` | A number representing how far down the user has pulled. The number `0` represents the user hasn't pulled down at all. The number `1`, and anything greater than `1`, represents that the user has pulled far enough down that when they let go then the refresh will happen. If they let go and the number is less than `1`, then the refresh will not happen, and the content will return to it's original position. |
### `cancel() => void`
Changes the refresher's state from `refreshing` to `cancelling`.
#### Returns
Type: `void`
### `complete() => void`
Call `complete()` when your async operation has completed.
For example, the `refreshing` state is while the app is performing
an asynchronous operation, such as receiving more data from an
AJAX request. Once the data has been received, you then call this
method to signify that the refreshing has completed and to close
the refresher. This method also changes the refresher's state from
`refreshing` to `completing`.
#### Returns
Type: `void`
### `getProgress() => Promise<number>`
A number representing how far down the user has pulled.
The number `0` represents the user hasn't pulled down at all. The
number `1`, and anything greater than `1`, represents that the user
has pulled far enough down that when they let go then the refresh will
happen. If they let go and the number is less than `1`, then the
refresh will not happen, and the content will return to it's original
position.
#### Returns
Type: `Promise<number>`
----------------------------------------------