react-native-permission-item
v0.1.5
Published
Customizable, easy to use permission item component for React Native.
Downloads
6
Maintainers
Readme
Installation
Add the dependency:
npm i react-native-permission-item
Peer Dependencies
"@freakycoder/react-native-bounceable": ">= 0.2.4"
Usage
Import
import PermissionItem from "react-native-permission-item";
Fundamental Usage
<PermissionItem
title="Location Permission"
isGranted={isLocPermGranted}
source={require("./assets/permissions/map.png")}
description="We need this permission for the geolocation based app to function functionally"
onPress={this.handleRequestLocPermission}
/>
Example Project 😍
You can checkout the example project 🥰
Simply run
npm i
react-native run-ios/android
should work of the example project.
Configuration - Props
Fundamentals
| Property | Type | Default | Description | | ----------- | :------: | :-------: | ------------------------------------------------------------------ | | title | string | undefined | change the title | | description | string | undefined | change the descrition | | source | Image | undefined | set your own image | | isGranted | boolean | false | set and change the granted or not button text | | onPress | function | undefined | set your own logic for the button functionality when it is pressed |
Future Plans
- [x] ~~LICENSE~~
- [ ] Write an article about the lib on Medium
Change Log
Change log will be here !
Author
FreakyCoder, [email protected]
License
React Native Permission Item is available under the MIT license. See the LICENSE file for more info.