0.1.32 • Published 3 years ago
rn-btaskee-booking-sdk v0.1.32
rn-btaskee-booking-sdk
npm install rn-btaskee-booking-sdkor
yarn add rn-btaskee-booking-sdkadd some lib in package.json
"dependencies": {
...
"@react-native-async-storage/async-storage": "1.18.1",
"@react-navigation/bottom-tabs": "6.5.7",
"axios": "1.3.4",
"lodash": "4.17.21",
"moment": "2.29.4",
"react-native-config": "1.5.0",
"react-native-datepicker": "1.7.2",
"react-native-device-info": "10.6.0",
"react-native-i18n": "2.0.15",
"react-native-keyboard-aware-scroll-view": "0.9.5",
"react-native-localize": "2.2.6",
"react-native-modal": "13.0.1",
"react-redux": "7.2.4",
"redux": "4.1.0"
},run: yarn && cd ios && pod installUsage
IMPORT;
import { BtaskeeSDKBooking } from 'rn-btaskee-booking-sdk';
<BtaskeeSDKBooking
services={<service>}
userInfo={<user info>}
config={<config>}
/>;Props:
| Name | Type | Required | Description |
|---|---|---|---|
| services | string[] | Yes | 'CLEANING', 'AIR-CONDITIONER' |
| userInfo | object | Yes | {name: string, phone: string (required), email: string} |
| config | object | yes | {countryCode: '+84' or '+66,locale: 'vi' or 'th',env: 'DEV' or 'PRODUCTION',apiKey: string} |
Example
import { NavigationContainer, useNavigation } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import React from 'react';
import { Text, TouchableOpacity, View } from 'react-native';
import { BtaskeeSDKBooking } from 'rn-btaskee-booking-sdk';
const Stack = createStackNavigator();
const HomeScreen = () => {
const navigation = useNavigation();
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<TouchableOpacity
style={{ borderWidth: 1, backgroundColor: 'orange', padding: 10 }}
onPress={() => {
navigation.navigate('BTaskeeScreen');
}}
>
<Text>bTaskee</Text>
</TouchableOpacity>
</View>
);
};
const BtaskeeScreen = () => {
return (
<BtaskeeSDKBooking
services={['CLEANING', 'AIR-CONDITIONER']}
userInfo={{
name: 'test',
phone: '0834567898',
email: 'test@gmail.com',
}}
config={{
countryCode: '+66',
locale: 'th',
env: 'DEV',
apiKey: '',
}}
/>
);
};
const App = () => {
return (
<NavigationContainer>
<Stack.Navigator
screenOptions={{
headerShown: false,
}}
>
<Stack.Screen name="HomeScreen" component={HomeScreen} />
<Stack.Screen name="BTaskeeScreen" component={BtaskeeScreen} />
</Stack.Navigator>
</NavigationContainer>
);
};
export default App;Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library
0.1.31
3 years ago
0.1.32
3 years ago
0.1.30
3 years ago
0.1.29
3 years ago
0.1.28
3 years ago
0.1.27
3 years ago
0.1.26
3 years ago
0.1.25
3 years ago
0.1.23
3 years ago
0.1.22
3 years ago
0.1.21
3 years ago
0.1.20
3 years ago
0.1.19
3 years ago
0.1.18
3 years ago
0.1.17
3 years ago
0.1.16
3 years ago
0.1.15
3 years ago
0.1.14
3 years ago
0.1.13
3 years ago
0.1.12
3 years ago
0.1.11
3 years ago
0.1.10
3 years ago
0.1.9
3 years ago
0.1.8
3 years ago
0.1.7
3 years ago
0.1.6
3 years ago
0.1.5
3 years ago
0.1.4
3 years ago
0.1.3
3 years ago
0.1.2
3 years ago
0.1.1
3 years ago
0.1.0
3 years ago