react-native-permission-item

Customizable, easy to use permission item component for React Native

Downloads
8
Stars
5

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

  • 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.

Package Rankings
Top 20.87% on Npmjs.org
Badges
Extracted from project README
React Native Permission Item npm version npm License: MIT styled with prettier
Related Projects