Customizable, easy to use permission item component for React Native
Add the dependency:
npm i react-native-permission-item
"@freakycoder/react-native-bounceable": ">= 0.2.4"
import PermissionItem from "react-native-permission-item";
<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}
/>
You can checkout the example project 🥰
Simply run
npm i
react-native run-ios/android
should work of the example project.
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 |
Change log will be here !
FreakyCoder, [email protected]
React Native Permission Item is available under the MIT license. See the LICENSE file for more info.