@med247-package/wpa-sdk
v0.1.12
Published
WebView-WPA
Downloads
1
Readme
wpa-sdk
WebView-WPA
Installation
npm install @med247-package/wpa-sdk react-native-webview @react-native-async-storage/async-storage
// or
yarn @med247-package/wpa-sdk react-native-webview @react-native-async-storage/async-storage
//
cd ios && pod install
Usage
import { WPA } from 'wpa-sdk';
// ...
<WPA
env={env}
secretkey={secretkey}
code={code}
button={button}
style={style}
user={{
fullname: fullname,
phone: phone,
email: email,
birthday: birthday,
address: address,
gender: gender,
uid: uid,
}}
/>;
explain
interface IWPAProps {
env: 'develop' | 'qa' | 'staging' | 'production';
code: string;
secretkey: string;
style?: { icon?: StyleProp<ImageStyle>; textIcon?: StyleProp<TextStyle> };
button?: React.JSX.Element;
user?: {
uid?: string;
phone?: string;
email?: string;
fullname?: string;
birthday?: string;
gender?: 'male' | 'female' | 'other';
address?: string;
};
}
// env: Development environment
// code, secretkey: Identification for the partner, provided by Med247
// style: Style to customize default Med247 icon available
// button: Customize Med247 app icon yourself
// user: Customer information transferred to automatically create accounts for customers.
See the contributing guide to learn how to contribute to the repository and the development workflow.