1.0.0 • Published 4 years ago

okra-react-native-expo v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

okra-react-native

This is a react native library for expo users to help implement okra widget

Get Started

This library would help you add Okra widget to your react native android app in no time. All you need to do is ...

Install

  1. Clone the git library using:
git clone https://github.com/okraHQ/react-native-expo.git
  1. Pack the library with npm (Inside the root directory):
npm pack

this would create a tgz extention file named okra-react-native-expo-1.0.0.tgz.

  1. Install this file in your react native project using the following command:
npm install ${path}/okra-react-native-expo-1.0.0.tgz

${path} refers to the absolute path to the okra-react-native-expo-1.0.0.tgz file for example: C:\Users\Java\Documents\Github\okra-react-native\react-native-okra-react-native\okra-react-native-expo-1.0.0.tgz where the packed npm module is located.

Usage

import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import {OkraView} from 'okra-react-native-expo';

export default function App() {
  return (
    <OkraView
      clientName = "mesut ozil"
      okraKey = "ea0059da-2d35-56b8-b3df-1280226b920f"
      token = "5da64ac38e94d862392d092d"
      products = {["auth","transactions","balance","income"]}
      onClose = {function(){alert("this is my concept")}}
    />
  );
}

OkraOptions

NameTypeRequiredDefault ValueDescription
keyStringtrueundefinedYour public key from Okra.
tokenStringtrueundefinedYour pubic Key from okra. Use test key for test mode and live key for live mode
productsArray[String]trueundefinedThe Okra products you want to use with the widget.
envStringtrueundefined
clientNameStringtrueundefinedName of the customer using the widget on the application
onClosefunctiontrueundefinedThis acts as a callback that gets fired when the OkraView Component has been closed. It is intended to hold your navigation code, to navigate to previous page or any intended page.