Skip to content

WrathChaos/react-native-permission-item

Repository files navigation

React Native Permission Item

React Native Permission Item

npm version npm Platform - Android and iOS License: MIT styled with prettier

React Native Permission Service React Native Permission Service

Installation

Add the dependency:

npm i react-native-permission-item

Peer Dependencies

IMPORTANT! You need install them
"@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.