@propel-nsl/propel-react-native-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/fonts/Lexend-Black.ttf +0 -0
- package/assets/fonts/Lexend-Bold.ttf +0 -0
- package/assets/fonts/Lexend-ExtraBold.ttf +0 -0
- package/assets/fonts/Lexend-ExtraLight.ttf +0 -0
- package/assets/fonts/Lexend-Light.ttf +0 -0
- package/assets/fonts/Lexend-Medium.ttf +0 -0
- package/assets/fonts/Lexend-Regular.ttf +0 -0
- package/assets/fonts/Lexend-SemiBold.ttf +0 -0
- package/assets/fonts/Lexend-Thin.ttf +0 -0
- package/assets/images/HomeGoods.png +0 -0
- package/assets/images/accessories.png +0 -0
- package/assets/images/amazon.png +0 -0
- package/assets/images/apnaClubLogo.png +0 -0
- package/assets/images/apparel.png +0 -0
- package/assets/images/backgroundblue.png +0 -0
- package/assets/images/bannerCard.png +0 -0
- package/assets/images/bottomWave.png +0 -0
- package/assets/images/coin_1_1.png +0 -0
- package/assets/images/flipkart.png +0 -0
- package/assets/images/frame_1171278967.png +0 -0
- package/assets/images/gift.png +0 -0
- package/assets/images/herobanner.png +0 -0
- package/assets/images/hinduPencilsLogo.png +0 -0
- package/assets/images/icons/addwhiteicon.png +0 -0
- package/assets/images/icons/arrow-back.png +0 -0
- package/assets/images/icons/arrowgreen.png +0 -0
- package/assets/images/icons/arrowred.png +0 -0
- package/assets/images/icons/arrowright.png +0 -0
- package/assets/images/icons/arrowup.png +0 -0
- package/assets/images/icons/blackarrowdown.png +0 -0
- package/assets/images/icons/blackarrowup.png +0 -0
- package/assets/images/icons/blackcross.png +0 -0
- package/assets/images/icons/call.png +0 -0
- package/assets/images/icons/camera.png +0 -0
- package/assets/images/icons/cart.png +0 -0
- package/assets/images/icons/chat.png +0 -0
- package/assets/images/icons/circleblack.png +0 -0
- package/assets/images/icons/copy.png +0 -0
- package/assets/images/icons/cross.png +0 -0
- package/assets/images/icons/delete.png +0 -0
- package/assets/images/icons/delivery.png +0 -0
- package/assets/images/icons/eVoucher.png +0 -0
- package/assets/images/icons/editIcon.png +0 -0
- package/assets/images/icons/email.png +0 -0
- package/assets/images/icons/eye.png +0 -0
- package/assets/images/icons/faq.png +0 -0
- package/assets/images/icons/filtericon.png +0 -0
- package/assets/images/icons/greyDownArrow.png +0 -0
- package/assets/images/icons/help.png +0 -0
- package/assets/images/icons/home.png +0 -0
- package/assets/images/icons/homeinactive.png +0 -0
- package/assets/images/icons/i_blackicon.png +0 -0
- package/assets/images/icons/i_icon.png +0 -0
- package/assets/images/icons/location.png +0 -0
- package/assets/images/icons/logout.png +0 -0
- package/assets/images/icons/minus.png +0 -0
- package/assets/images/icons/myOrders.png +0 -0
- package/assets/images/icons/orders.png +0 -0
- package/assets/images/icons/pencillogo.png +0 -0
- package/assets/images/icons/pending.png +0 -0
- package/assets/images/icons/plus.png +0 -0
- package/assets/images/icons/redCross.png +0 -0
- package/assets/images/icons/redCrossicon.png +0 -0
- package/assets/images/icons/redWarningicon.png +0 -0
- package/assets/images/icons/redeem.png +0 -0
- package/assets/images/icons/redeemactive.png +0 -0
- package/assets/images/icons/redemptionHistory.png +0 -0
- package/assets/images/icons/redhelpicon.png +0 -0
- package/assets/images/icons/search.png +0 -0
- package/assets/images/icons/stopwatch.png +0 -0
- package/assets/images/icons/successTick.gif +0 -0
- package/assets/images/icons/tick.png +0 -0
- package/assets/images/icons/tnc.png +0 -0
- package/assets/images/icons/user.png +0 -0
- package/assets/images/icons/userredicon.png +0 -0
- package/assets/images/icons/wavecorner.png +0 -0
- package/assets/images/logo.png +0 -0
- package/assets/images/myntra_copy.png +0 -0
- package/assets/images/nike.png +0 -0
- package/assets/images/oq3p0u0_1.png +0 -0
- package/assets/images/profileicon.png +0 -0
- package/assets/images/topWave.png +0 -0
- package/assets/images/zagglePropelLogo.png +0 -0
- package/index.ts +23 -0
- package/lib/index.ts +25 -0
- package/package.json +70 -0
- package/src/PropelSDKScreen.tsx +98 -0
- package/src/SDKApp.tsx +540 -0
- package/src/bridge/SDKBridge.ts +104 -0
- package/src/bridge/index.ts +3 -0
- package/src/components/SDKBackHandler.tsx +187 -0
- package/src/components/SDKProfile.tsx +87 -0
- package/src/components/SDKProfileWrapper.tsx +51 -0
- package/src/constants.ts +10 -0
- package/src/contexts/SDKContext.tsx +72 -0
- package/src/hooks/useSDKBackNavigation.ts +61 -0
- package/src/navigation/SDKMainTabNavigator.tsx +315 -0
- package/src/navigation/SDKNavigator.tsx +41 -0
- package/src/redux/store.ts +32 -0
- package/src/screens/Dashboard/index.tsx +531 -0
- package/src/screens/Dashboard/styles.ts +512 -0
- package/src/screens/DeliveryAddress/index.tsx +221 -0
- package/src/screens/DeliveryAddress/styles.ts +122 -0
- package/src/screens/E-Vouchers/index.tsx +157 -0
- package/src/screens/E-Vouchers/styles.ts +106 -0
- package/src/screens/Faq/Faq.constants.ts +164 -0
- package/src/screens/Faq/index.tsx +114 -0
- package/src/screens/Faq/styles.ts +131 -0
- package/src/screens/Help/index.tsx +128 -0
- package/src/screens/Help/styles.ts +121 -0
- package/src/screens/Login/index.tsx +215 -0
- package/src/screens/Login/styles.ts +134 -0
- package/src/screens/MyCart/MyCart.constants.ts +13 -0
- package/src/screens/MyCart/index.tsx +318 -0
- package/src/screens/MyCart/styles.ts +249 -0
- package/src/screens/MyOrders/index.tsx +87 -0
- package/src/screens/MyOrders/styles.ts +281 -0
- package/src/screens/MyProfile/index.tsx +72 -0
- package/src/screens/MyProfile/styles.ts +47 -0
- package/src/screens/NewDeliveryAddress/index.tsx +360 -0
- package/src/screens/NewDeliveryAddress/styles.ts +68 -0
- package/src/screens/Onboarding/index.tsx +57 -0
- package/src/screens/Onboarding/styles.ts +60 -0
- package/src/screens/OrdersDetails/index.tsx +333 -0
- package/src/screens/OrdersDetails/styles.ts +262 -0
- package/src/screens/OtpVerification/index.tsx +283 -0
- package/src/screens/OtpVerification/styles.ts +197 -0
- package/src/screens/PaymentMethod/index.tsx +389 -0
- package/src/screens/PaymentMethod/styles.ts +246 -0
- package/src/screens/PointsLog/index.tsx +286 -0
- package/src/screens/PointsLog/styles.ts +156 -0
- package/src/screens/ProductDetails/index.tsx +682 -0
- package/src/screens/ProductDetails/styles.ts +372 -0
- package/src/screens/Profile/index.tsx +368 -0
- package/src/screens/Profile/styles.ts +158 -0
- package/src/screens/RedemptionHistory/RedemptionHistory.constants.ts +4 -0
- package/src/screens/RedemptionHistory/index.tsx +304 -0
- package/src/screens/RedemptionHistory/styles.ts +84 -0
- package/src/screens/Reedem/index.tsx +345 -0
- package/src/screens/Reedem/styles.ts +269 -0
- package/src/screens/TnC/TnC.constants.ts +169 -0
- package/src/screens/TnC/index.tsx +83 -0
- package/src/screens/TnC/styles.ts +88 -0
- package/src/screens/TransactionSuccessful/index.tsx +77 -0
- package/src/screens/TransactionSuccessful/styles.ts +77 -0
- package/src/screens/Verification/index.tsx +58 -0
- package/src/screens/Verification/styles.ts +74 -0
- package/src/screens/index.ts +23 -0
- package/src/types/index.ts +46 -0
- package/src-app/components/AmountBreakDownModal/index.tsx +86 -0
- package/src-app/components/AmountBreakDownModal/styles.ts +110 -0
- package/src-app/components/BottomNavIcons.tsx +125 -0
- package/src-app/components/Button.tsx +120 -0
- package/src-app/components/Card.tsx +47 -0
- package/src-app/components/ConfirmPopup/ConfirmPopup.constants.ts +25 -0
- package/src-app/components/ConfirmPopup/index.tsx +48 -0
- package/src-app/components/ConfirmPopup/styles.ts +167 -0
- package/src-app/components/CustomButton/index.tsx +67 -0
- package/src-app/components/CustomButton/styles.ts +44 -0
- package/src-app/components/CustomCard/index.tsx +221 -0
- package/src-app/components/CustomCard/styles.ts +184 -0
- package/src-app/components/CustomError/index.tsx +54 -0
- package/src-app/components/CustomError/styles.ts +41 -0
- package/src-app/components/CustomImage/index.tsx +37 -0
- package/src-app/components/CustomImage/styles.ts +5 -0
- package/src-app/components/CustomLoader/index.tsx +45 -0
- package/src-app/components/CustomLoader/styles.ts +35 -0
- package/src-app/components/CustomMessagePopUp/index.tsx +51 -0
- package/src-app/components/CustomMessagePopUp/styles.ts +74 -0
- package/src-app/components/CustomProductCard/index.tsx +13 -0
- package/src-app/components/CustomProductCard/styles.ts +5 -0
- package/src-app/components/FilterModal.tsx +372 -0
- package/src-app/components/Footer/index.tsx +23 -0
- package/src-app/components/Footer/styles.ts +37 -0
- package/src-app/components/Icon.tsx +80 -0
- package/src-app/components/Logout/index.tsx +82 -0
- package/src-app/components/Logout/styles.ts +116 -0
- package/src-app/components/MobileHeader.tsx +141 -0
- package/src-app/components/NoDataFound/index.tsx +18 -0
- package/src-app/components/NoDataFound/styles.ts +26 -0
- package/src-app/components/OTPModal.tsx +747 -0
- package/src-app/components/ProfileField.tsx +47 -0
- package/src-app/components/QuantityModal/index.tsx +113 -0
- package/src-app/components/QuantityModal/styles.ts +84 -0
- package/src-app/components/TabBarIcons.tsx +110 -0
- package/src-app/components/TextInput.tsx +79 -0
- package/src-app/components/ToastConfig.tsx +60 -0
- package/src-app/components/index.ts +18 -0
- package/src-app/config/env.ts +22 -0
- package/src-app/constants/Fonts.ts +12 -0
- package/src-app/constants/Formatter.ts +39 -0
- package/src-app/constants/HtmlSanitization.ts +46 -0
- package/src-app/constants/Images.ts +81 -0
- package/src-app/constants/Labels.ts +8 -0
- package/src-app/constants/Messages.ts +108 -0
- package/src-app/constants/Routes.ts +17 -0
- package/src-app/constants/Scaling.ts +5 -0
- package/src-app/constants/Text.ts +8 -0
- package/src-app/constants/offSets.ts +18 -0
- package/src-app/hooks/useAppDispatch.ts +4 -0
- package/src-app/hooks/useAppSelector.ts +4 -0
- package/src-app/hooks/useBackHandler.ts +47 -0
- package/src-app/hooks/useScreenBackHandler.ts +91 -0
- package/src-app/navigation/AppNavigator.tsx +34 -0
- package/src-app/navigation/MainTabNavigator.tsx +294 -0
- package/src-app/redux/authSaga.ts +605 -0
- package/src-app/redux/authSlice.ts +754 -0
- package/src-app/redux/rootSaga.ts +6 -0
- package/src-app/redux/store.ts +25 -0
- package/src-app/services/api.ts +14 -0
- package/src-app/services/endpoints.ts +33 -0
- package/src-app/services/index.ts +574 -0
- package/src-app/services/sdkCredentials.ts +44 -0
- package/src-app/styles/colors.ts +85 -0
- package/src-app/styles/shared.ts +112 -0
- package/src-app/types/authTypes.ts +155 -0
- package/src-app/types/navigation.ts +99 -0
- package/src-app/utils/Validation.ts +48 -0
- package/src-app/utils/filterPins.ts +29 -0
- package/src-app/utils/navigationUtils.ts +43 -0
- package/src-app/utils/useHardwareBack.ts +21 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { View, Text, ViewStyle, TextStyle } from "react-native";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import styles from "./styles";
|
|
4
|
+
import CustomImage from "../CustomImage";
|
|
5
|
+
import Images from "../../constants/Images";
|
|
6
|
+
|
|
7
|
+
interface CustomErrorProps {
|
|
8
|
+
message: string;
|
|
9
|
+
mainIcon?: any;
|
|
10
|
+
closeIcon?: any;
|
|
11
|
+
onClose?: () => void;
|
|
12
|
+
containerStyle?: ViewStyle;
|
|
13
|
+
textStyle?: TextStyle;
|
|
14
|
+
mainIconStyle?: any;
|
|
15
|
+
closeIconStyle?: any;
|
|
16
|
+
showCloseIcon?: boolean;
|
|
17
|
+
showMainIcon?: boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const CustomError: React.FC<CustomErrorProps> = ({
|
|
21
|
+
message,
|
|
22
|
+
mainIcon = Images.warningIcon,
|
|
23
|
+
closeIcon = Images.redErrorCrossIcon,
|
|
24
|
+
onClose,
|
|
25
|
+
containerStyle,
|
|
26
|
+
textStyle,
|
|
27
|
+
mainIconStyle,
|
|
28
|
+
closeIconStyle,
|
|
29
|
+
showCloseIcon = true,
|
|
30
|
+
showMainIcon = true,
|
|
31
|
+
}) => {
|
|
32
|
+
return (
|
|
33
|
+
<View style={[styles.container, containerStyle]}>
|
|
34
|
+
{showMainIcon && (
|
|
35
|
+
<CustomImage
|
|
36
|
+
source={mainIcon}
|
|
37
|
+
imgStyle={[styles.imgStyle, mainIconStyle]}
|
|
38
|
+
/>
|
|
39
|
+
)}
|
|
40
|
+
<View style={styles.row}>
|
|
41
|
+
<Text style={[styles.text, textStyle]}>{message}</Text>
|
|
42
|
+
{showCloseIcon && (
|
|
43
|
+
<CustomImage
|
|
44
|
+
source={closeIcon}
|
|
45
|
+
imgStyle={[styles.icon, closeIconStyle]}
|
|
46
|
+
onPress={onClose}
|
|
47
|
+
/>
|
|
48
|
+
)}
|
|
49
|
+
</View>
|
|
50
|
+
</View>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export default CustomError;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import FontFamily from "../../constants/Fonts";
|
|
3
|
+
import { colors } from "../../styles/colors";
|
|
4
|
+
|
|
5
|
+
const styles = StyleSheet.create({
|
|
6
|
+
container: {
|
|
7
|
+
padding: 10,
|
|
8
|
+
borderRadius: 10,
|
|
9
|
+
borderWidth: 1,
|
|
10
|
+
borderColor: colors.red,
|
|
11
|
+
alignItems: "center",
|
|
12
|
+
backgroundColor: colors.errorbgColor,
|
|
13
|
+
flexDirection: 'row',
|
|
14
|
+
justifyContent: 'space-between',
|
|
15
|
+
marginBottom: 15
|
|
16
|
+
},
|
|
17
|
+
imgStyle: {
|
|
18
|
+
width: 20,
|
|
19
|
+
height: 20,
|
|
20
|
+
resizeMode: "contain",
|
|
21
|
+
},
|
|
22
|
+
icon: {
|
|
23
|
+
width: 9.41,
|
|
24
|
+
height: 9.01,
|
|
25
|
+
resizeMode: "contain",
|
|
26
|
+
},
|
|
27
|
+
row: {
|
|
28
|
+
flexDirection: 'row',
|
|
29
|
+
alignItems: 'center',
|
|
30
|
+
justifyContent: 'space-between',
|
|
31
|
+
width: '85%',
|
|
32
|
+
},
|
|
33
|
+
text: {
|
|
34
|
+
fontFamily: FontFamily.LEXEND_REGULAR,
|
|
35
|
+
fontSize: 12,
|
|
36
|
+
fontWeight: '400',
|
|
37
|
+
color: colors.red,
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export default styles;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Image,
|
|
4
|
+
StyleProp,
|
|
5
|
+
TouchableOpacity,
|
|
6
|
+
GestureResponderEvent,
|
|
7
|
+
} from 'react-native';
|
|
8
|
+
import FastImage, { ImageStyle } from 'react-native-fast-image';
|
|
9
|
+
|
|
10
|
+
interface ImageProps {
|
|
11
|
+
source: number | { uri: string };
|
|
12
|
+
imgStyle?: StyleProp<ImageStyle>;
|
|
13
|
+
onPress?: (event: GestureResponderEvent) => void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const CustomImage: React.FC<ImageProps> = ({ source, imgStyle, onPress }) => {
|
|
17
|
+
const ImageComponent =
|
|
18
|
+
typeof source === 'number' ? (
|
|
19
|
+
<Image source={source} style={imgStyle as any} resizeMode="contain" />
|
|
20
|
+
) : (
|
|
21
|
+
<FastImage
|
|
22
|
+
source={source}
|
|
23
|
+
style={imgStyle}
|
|
24
|
+
resizeMode={FastImage.resizeMode.contain}
|
|
25
|
+
/>
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
if (onPress) {
|
|
29
|
+
return (
|
|
30
|
+
<TouchableOpacity onPress={onPress}>{ImageComponent}</TouchableOpacity>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return ImageComponent;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export default CustomImage;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { View, ActivityIndicator, Text } from 'react-native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styles from './styles';
|
|
4
|
+
import { colors } from '../../styles/colors';
|
|
5
|
+
|
|
6
|
+
interface CustomLoaderProps {
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
visible?: boolean;
|
|
9
|
+
size?: 'small' | 'large';
|
|
10
|
+
color?: string;
|
|
11
|
+
backgroundColor?: string;
|
|
12
|
+
opacity?: number;
|
|
13
|
+
text?: string;
|
|
14
|
+
fullScreen?: boolean;
|
|
15
|
+
style?: any;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const CustomLoader: React.FC<CustomLoaderProps> = ({
|
|
19
|
+
loading,
|
|
20
|
+
visible = true,
|
|
21
|
+
size = 'large',
|
|
22
|
+
color = colors.primary,
|
|
23
|
+
backgroundColor = 'rgba(255, 255, 255, 0.7)',
|
|
24
|
+
opacity = 1,
|
|
25
|
+
text,
|
|
26
|
+
fullScreen = true,
|
|
27
|
+
style,
|
|
28
|
+
}) => {
|
|
29
|
+
const isVisible = loading !== undefined ? loading : visible;
|
|
30
|
+
|
|
31
|
+
if (!isVisible) return null;
|
|
32
|
+
|
|
33
|
+
const containerStyle = fullScreen
|
|
34
|
+
? [styles.fullScreenLoader, { backgroundColor, opacity }, style]
|
|
35
|
+
: [styles.inlineLoader, { backgroundColor, opacity }, style];
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<View style={containerStyle}>
|
|
39
|
+
<ActivityIndicator size={size} color={color} />
|
|
40
|
+
{text && <Text style={styles.loadingText}>{text}</Text>}
|
|
41
|
+
</View>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default CustomLoader;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { typography, spacing } from '../../styles/shared';
|
|
3
|
+
import { colors } from '../../styles/colors';
|
|
4
|
+
|
|
5
|
+
const styles = StyleSheet.create({
|
|
6
|
+
container: {
|
|
7
|
+
flex: 1,
|
|
8
|
+
backgroundColor: '#FFFFFF',
|
|
9
|
+
},
|
|
10
|
+
fullScreenLoader: {
|
|
11
|
+
position: 'absolute',
|
|
12
|
+
top: 0,
|
|
13
|
+
left: 0,
|
|
14
|
+
right: 0,
|
|
15
|
+
bottom: 0,
|
|
16
|
+
// backgroundColor: 'rgba(255, 255, 255, 0.7)',
|
|
17
|
+
justifyContent: 'center',
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
zIndex: 100,
|
|
20
|
+
},
|
|
21
|
+
inlineLoader: {
|
|
22
|
+
justifyContent: 'center',
|
|
23
|
+
alignItems: 'center',
|
|
24
|
+
padding: spacing.lg,
|
|
25
|
+
backgroundColor: 'rgba(255, 255, 255, 0.7)',
|
|
26
|
+
},
|
|
27
|
+
loadingText: {
|
|
28
|
+
...typography.body,
|
|
29
|
+
color: colors.onSurface,
|
|
30
|
+
marginTop: spacing.sm,
|
|
31
|
+
textAlign: 'center',
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export default styles;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { View, Text, TouchableWithoutFeedback } from 'react-native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styles from './styles';
|
|
4
|
+
import CustomButton from '../CustomButton';
|
|
5
|
+
import CustomImage from '../CustomImage';
|
|
6
|
+
|
|
7
|
+
interface CustomMessagePopUpProps {
|
|
8
|
+
navigation?: any;
|
|
9
|
+
title: string;
|
|
10
|
+
message: string;
|
|
11
|
+
icon?: number | { uri: string };
|
|
12
|
+
visible: boolean;
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const CustomMessagePopUp: React.FC<CustomMessagePopUpProps> = ({
|
|
17
|
+
title,
|
|
18
|
+
message,
|
|
19
|
+
visible,
|
|
20
|
+
onClose,
|
|
21
|
+
icon,
|
|
22
|
+
}) => {
|
|
23
|
+
if (!visible) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<View style={styles.absoluteContainer} pointerEvents="box-none">
|
|
29
|
+
<TouchableWithoutFeedback onPress={onClose}>
|
|
30
|
+
<View style={styles.overlay} />
|
|
31
|
+
</TouchableWithoutFeedback>
|
|
32
|
+
|
|
33
|
+
<View style={styles.modalContainer}>
|
|
34
|
+
<View style={styles.iconContainer}>
|
|
35
|
+
{!!icon && <CustomImage source={icon} imgStyle={styles.icon} />}
|
|
36
|
+
<Text style={styles.title}>{title}</Text>
|
|
37
|
+
</View>
|
|
38
|
+
|
|
39
|
+
<Text style={styles.message}>{message}</Text>
|
|
40
|
+
|
|
41
|
+
<CustomButton
|
|
42
|
+
title="Close"
|
|
43
|
+
onPress={onClose}
|
|
44
|
+
customButtonContainerStyle={styles.customButtonContainer}
|
|
45
|
+
/>
|
|
46
|
+
</View>
|
|
47
|
+
</View>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export default CustomMessagePopUp;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Dimensions, StyleSheet } from 'react-native';
|
|
2
|
+
import FontFamily from '../../constants/Fonts';
|
|
3
|
+
import { colors } from '../../styles/colors';
|
|
4
|
+
|
|
5
|
+
const { height: screenHeight, width: screenWidth } = Dimensions.get('window');
|
|
6
|
+
|
|
7
|
+
const styles = StyleSheet.create({
|
|
8
|
+
container: {
|
|
9
|
+
flex: 1,
|
|
10
|
+
backgroundColor: '#FFFFFF',
|
|
11
|
+
},
|
|
12
|
+
absoluteContainer: {
|
|
13
|
+
position: 'absolute',
|
|
14
|
+
top: 0,
|
|
15
|
+
left: 0,
|
|
16
|
+
right: 0,
|
|
17
|
+
bottom: 0,
|
|
18
|
+
width: screenWidth,
|
|
19
|
+
height: screenHeight,
|
|
20
|
+
justifyContent: 'center',
|
|
21
|
+
alignItems: 'center',
|
|
22
|
+
zIndex: 50000,
|
|
23
|
+
elevation: 50000,
|
|
24
|
+
},
|
|
25
|
+
overlay: {
|
|
26
|
+
position: 'absolute',
|
|
27
|
+
top: 0,
|
|
28
|
+
left: 0,
|
|
29
|
+
right: 0,
|
|
30
|
+
bottom: 0,
|
|
31
|
+
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
32
|
+
},
|
|
33
|
+
modalContainer: {
|
|
34
|
+
width: '100%',
|
|
35
|
+
maxWidth: '100%',
|
|
36
|
+
height: '33%',
|
|
37
|
+
backgroundColor: '#FFFFFF',
|
|
38
|
+
borderRadius: 30,
|
|
39
|
+
paddingHorizontal: 20,
|
|
40
|
+
paddingTop: 10,
|
|
41
|
+
justifyContent: 'center',
|
|
42
|
+
},
|
|
43
|
+
title: {
|
|
44
|
+
fontSize: 18,
|
|
45
|
+
fontWeight: '600',
|
|
46
|
+
marginVertical: 15,
|
|
47
|
+
textAlign: 'center',
|
|
48
|
+
color: colors.black,
|
|
49
|
+
fontFamily: FontFamily.LEXEND_BOLD,
|
|
50
|
+
},
|
|
51
|
+
message: {
|
|
52
|
+
fontSize: 16,
|
|
53
|
+
textAlign: 'center',
|
|
54
|
+
color: colors.black,
|
|
55
|
+
fontFamily: FontFamily.LEXEND_REGULAR,
|
|
56
|
+
fontWeight: '400',
|
|
57
|
+
},
|
|
58
|
+
customButtonContainer: {
|
|
59
|
+
paddingHorizontal: 20,
|
|
60
|
+
},
|
|
61
|
+
icon: {
|
|
62
|
+
width: 20,
|
|
63
|
+
height: 20,
|
|
64
|
+
resizeMode: 'contain',
|
|
65
|
+
},
|
|
66
|
+
iconContainer: {
|
|
67
|
+
flexDirection: 'row',
|
|
68
|
+
alignItems: 'center',
|
|
69
|
+
justifyContent: 'center',
|
|
70
|
+
gap: 10,
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
export default styles;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { View, Text } from 'react-native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styles from './styles';
|
|
4
|
+
|
|
5
|
+
const CustomProductCard: React.FC = () => {
|
|
6
|
+
return (
|
|
7
|
+
<View>
|
|
8
|
+
{/* <Text>CustomProductCard</Text> */}
|
|
9
|
+
</View>
|
|
10
|
+
);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default CustomProductCard;
|