From edd71545939b13b9ee997f6a71049f5fb30f24a7 Mon Sep 17 00:00:00 2001 From: "d.krokhmal" Date: Sun, 10 Nov 2019 19:05:48 +0300 Subject: [PATCH] added readme and license --- LICENSE.md | 21 ++++++++++++++++++++ README.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 LICENSE.md create mode 100644 README.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..9de1d5c --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 Krokhmal Daniil Ivanovich (Крохмаль Даниил Иванович) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..418fe2f --- /dev/null +++ b/README.md @@ -0,0 +1,56 @@ +# React Native Refresh Control + +This module include custom react native refresh control. + +## Installation + +``` +$ npm install --save react-native-refresh-control +``` + +## Usage + +`import { CustomRefreshControl } from 'react-native-refresh-control';` + +All parameters for components are optional + +## Basic Usage + +ScrollView + +```javascript + {}} callbackError={e => {}} /> + } +> +``` + +FlatList + +```javascript + {}} callbackError={e => {}} /> + } +> +``` + +## Props + +| Prop | Type | Default | Description | Required | +| ------------------------ | --------- | ------- | ----------------------------------------------------------------------------------------------------- | -------- | +| **`callbackError`** | `function` | `() => {}` | In case of error setClearedInterval function | No | +| **`callback`** | `function` | `null` | Your callback, for example, for data processing during a refresh | No | +| **`callbackParams`**| `any` | `undefined` | Any set of parameters when calling prop callback | No | + +## Built With + +* [React-Native](https://facebook.github.io/react-native/) +* [Prop-Types](https://github.com/facebook/prop-types) +* [React](https://github.com/facebook/react) + +## License + +This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details +