related-ui-components 2.0.2 → 2.0.3

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.
@@ -1,59 +1,110 @@
1
1
  "use strict";
2
2
 
3
- import React from 'react';
4
- import { Text, StyleSheet, TouchableOpacity } from 'react-native';
5
- import { Ionicons } from '@expo/vector-icons';
3
+ import React from "react";
4
+ import { View, Text, StyleSheet, TouchableOpacity
5
+
6
+ // Import StyleProp for better type safety
7
+ } from "react-native";
8
+ import { Ionicons } from "@expo/vector-icons"; // Assuming you have this installed
6
9
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
10
  const LockOverlay = ({
8
11
  visible = true,
9
12
  containerStyle,
13
+ contentContainerStyle,
10
14
  iconStyle,
11
15
  textStyle,
12
- text = 'Unlock',
16
+ text = "Unlock",
17
+ // Default text, but can be null or empty
18
+ iconName = "lock-closed",
13
19
  iconSize = 50,
14
- iconColor = 'white',
20
+ iconColor = "white",
15
21
  overlayOpacity = 0.7,
16
- contentVerticalAlign = "center",
22
+ contentPosition = "center",
23
+ contentPadding = 20,
24
+ // Default padding for edge positions
17
25
  ...touchableProps
18
26
  }) => {
19
27
  if (!visible) return null;
20
- return /*#__PURE__*/_jsxs(TouchableOpacity, {
21
- style: [styles.overlay, {
22
- backgroundColor: `rgba(0, 0, 0, ${overlayOpacity})`
23
- }, contentVerticalAlign == "top" && {
24
- justifyContent: "flex-start",
25
- paddingTop: 50
26
- }, containerStyle],
28
+ const overlayStyles = [styles.overlayBase, {
29
+ backgroundColor: `rgba(0, 0, 0, ${overlayOpacity})`
30
+ }];
31
+
32
+ // Apply positioning styles to the main overlay container
33
+ switch (contentPosition) {
34
+ case "top-center":
35
+ overlayStyles.push({
36
+ justifyContent: "flex-start",
37
+ alignItems: "center",
38
+ paddingTop: contentPadding
39
+ });
40
+ break;
41
+ case "top-left":
42
+ overlayStyles.push({
43
+ justifyContent: "flex-start",
44
+ alignItems: "flex-start",
45
+ paddingTop: contentPadding,
46
+ paddingLeft: contentPadding
47
+ });
48
+ break;
49
+ case "top-right":
50
+ overlayStyles.push({
51
+ justifyContent: "flex-start",
52
+ alignItems: "flex-end",
53
+ paddingTop: contentPadding,
54
+ paddingRight: contentPadding
55
+ });
56
+ break;
57
+ case "center":
58
+ default:
59
+ overlayStyles.push({
60
+ justifyContent: "center",
61
+ alignItems: "center"
62
+ });
63
+ break;
64
+ }
65
+ overlayStyles.push(containerStyle); // Apply user-provided containerStyle last
66
+
67
+ return /*#__PURE__*/_jsx(TouchableOpacity, {
68
+ style: overlayStyles,
27
69
  activeOpacity: 0.8,
28
70
  ...touchableProps,
29
- children: [/*#__PURE__*/_jsx(Ionicons, {
30
- name: "lock-closed",
31
- size: iconSize,
32
- color: iconColor
33
- // style={iconStyle}
34
- }), /*#__PURE__*/_jsx(Text, {
35
- style: [styles.text, {
36
- color: iconColor
37
- }, textStyle],
38
- children: text
39
- })]
71
+ children: /*#__PURE__*/_jsxs(View, {
72
+ style: [styles.contentContainerBase, contentContainerStyle],
73
+ children: [/*#__PURE__*/_jsx(Ionicons, {
74
+ name: iconName // Cast to any if Ionicons types are too strict for dynamic names
75
+ ,
76
+ size: iconSize,
77
+ color: iconColor,
78
+ style: iconStyle
79
+ }), text && text.trim() !== "" && /*#__PURE__*/_jsx(Text, {
80
+ style: [styles.textBase, {
81
+ color: iconColor
82
+ }, textStyle],
83
+ children: text
84
+ })]
85
+ })
40
86
  });
41
87
  };
42
88
  const styles = StyleSheet.create({
43
- overlay: {
44
- position: 'absolute',
89
+ overlayBase: {
90
+ position: "absolute",
45
91
  top: 0,
46
92
  left: 0,
47
93
  right: 0,
48
94
  bottom: 0,
49
- justifyContent: 'center',
50
- alignItems: 'center',
51
- zIndex: 999
95
+ zIndex: 999 // Ensure it's on top
96
+ },
97
+ contentContainerBase: {
98
+ // This container ensures icon and text (if present) are aligned relative to each other
99
+ alignItems: "center" // Center text under the icon by default
52
100
  },
53
- text: {
54
- fontSize: 20,
55
- fontWeight: 'bold',
56
- marginTop: 12
101
+ textBase: {
102
+ fontSize: 18,
103
+ // Adjusted default size slightly
104
+ fontWeight: "bold",
105
+ marginTop: 10,
106
+ // Adjusted default margin
107
+ textAlign: "center"
57
108
  }
58
109
  });
59
110
  export default LockOverlay;
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","StyleSheet","TouchableOpacity","Ionicons","jsx","_jsx","jsxs","_jsxs","LockOverlay","visible","containerStyle","iconStyle","textStyle","text","iconSize","iconColor","overlayOpacity","contentVerticalAlign","touchableProps","style","styles","overlay","backgroundColor","justifyContent","paddingTop","activeOpacity","children","name","size","color","create","position","top","left","right","bottom","alignItems","zIndex","fontSize","fontWeight","marginTop"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/LockOverlay/LockOverlay.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAEEC,IAAI,EACJC,UAAU,EAGVC,gBAAgB,QAEX,cAAc;AAErB,SAASC,QAAQ,QAAQ,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAc9C,MAAMC,WAAuC,GAAGA,CAAC;EAC/CC,OAAO,GAAG,IAAI;EACdC,cAAc;EACdC,SAAS;EACTC,SAAS;EACTC,IAAI,GAAG,QAAQ;EACfC,QAAQ,GAAG,EAAE;EACbC,SAAS,GAAG,OAAO;EACnBC,cAAc,GAAG,GAAG;EACpBC,oBAAoB,GAAG,QAAQ;EAC/B,GAAGC;AACL,CAAC,KAAK;EACJ,IAAI,CAACT,OAAO,EAAE,OAAO,IAAI;EAEzB,oBACEF,KAAA,CAACL,gBAAgB;IACfiB,KAAK,EAAE,CACLC,MAAM,CAACC,OAAO,EACd;MAAEC,eAAe,EAAE,iBAAiBN,cAAc;IAAI,CAAC,EACvDC,oBAAoB,IAAI,KAAK,IAAI;MAACM,cAAc,EAAC,YAAY;MAAEC,UAAU,EAAE;IAAE,CAAC,EAC9Ed,cAAc,CACd;IACFe,aAAa,EAAE,GAAI;IAAA,GACfP,cAAc;IAAAQ,QAAA,gBAElBrB,IAAA,CAACF,QAAQ;MACPwB,IAAI,EAAC,aAAa;MAClBC,IAAI,EAAEd,QAAS;MACfe,KAAK,EAAEd;MACP;IAAA,CACD,CAAC,eACFV,IAAA,CAACL,IAAI;MAACmB,KAAK,EAAE,CAACC,MAAM,CAACP,IAAI,EAAE;QAAEgB,KAAK,EAAEd;MAAU,CAAC,EAAEH,SAAS,CAAE;MAAAc,QAAA,EACzDb;IAAI,CACD,CAAC;EAAA,CACS,CAAC;AAEvB,CAAC;AAED,MAAMO,MAAM,GAAGnB,UAAU,CAAC6B,MAAM,CAAC;EAC/BT,OAAO,EAAE;IACPU,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTZ,cAAc,EAAE,QAAQ;IACxBa,UAAU,EAAE,QAAQ;IACpBC,MAAM,EAAE;EACV,CAAC;EACDxB,IAAI,EAAE;IACJyB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,MAAM;IAClBC,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAEF,eAAehC,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["React","View","Text","StyleSheet","TouchableOpacity","Ionicons","jsx","_jsx","jsxs","_jsxs","LockOverlay","visible","containerStyle","contentContainerStyle","iconStyle","textStyle","text","iconName","iconSize","iconColor","overlayOpacity","contentPosition","contentPadding","touchableProps","overlayStyles","styles","overlayBase","backgroundColor","push","justifyContent","alignItems","paddingTop","paddingLeft","paddingRight","style","activeOpacity","children","contentContainerBase","name","size","color","trim","textBase","create","position","top","left","right","bottom","zIndex","fontSize","fontWeight","marginTop","textAlign"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/LockOverlay/LockOverlay.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,IAA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;AAEF,eAAe3C,WAAW","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/app.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAgBxC,QAAA,MAAM,QAAQ,yBA8Gb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/app.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,QAAA,MAAM,QAAQ,yBAwBb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -24,6 +24,9 @@ interface SelaDealCardProps {
24
24
  labelTextColor?: string;
25
25
  priceBackgroundColor?: string;
26
26
  priceTextColor?: string;
27
+ darkOverlayEnabled?: boolean;
28
+ darkOverlayColor?: string;
29
+ lockOverlay?: boolean;
27
30
  }
28
31
  declare const SelaDealCard: React.FC<SelaDealCardProps>;
29
32
  export default SelaDealCard;
@@ -1 +1 @@
1
- {"version":3,"file":"SelaDealCard.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Card/templates/SelaDealCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,mBAAmB,EACnB,SAAS,EACT,SAAS,EAGT,SAAS,EACT,cAAc,EAEf,MAAM,cAAc,CAAC;AAItB,UAAU,iBAAiB;IACzB,OAAO,EAAE,YAAY,GAAG,UAAU,CAAC;IACnC,eAAe,EAAE,mBAAmB,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,mBAAmB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC3C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,mBAAmB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC3C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA0K7C,CAAC;AA0EF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"SelaDealCard.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Card/templates/SelaDealCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACH,mBAAmB,EACnB,SAAS,EACT,SAAS,EAGT,SAAS,EACT,cAAc,EAEjB,MAAM,cAAc,CAAC;AAMtB,UAAU,iBAAiB;IACvB,OAAO,EAAE,YAAY,GAAG,UAAU,CAAC;IACnC,eAAe,EAAE,mBAAmB,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,mBAAmB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC3C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,mBAAmB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC3C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAsJ7C,CAAC;AAqEF,eAAe,YAAY,CAAC"}
@@ -1,15 +1,18 @@
1
- import React from 'react';
2
- import { ViewStyle, TextStyle, TouchableOpacityProps } from 'react-native';
1
+ import React from "react";
2
+ import { ViewStyle, TextStyle, TouchableOpacityProps, StyleProp } from "react-native";
3
3
  interface LockOverlayProps extends TouchableOpacityProps {
4
4
  visible?: boolean;
5
- containerStyle?: ViewStyle;
6
- iconStyle?: ViewStyle;
7
- textStyle?: TextStyle;
8
- text?: string;
5
+ containerStyle?: StyleProp<ViewStyle>;
6
+ contentContainerStyle?: StyleProp<ViewStyle>;
7
+ iconStyle?: StyleProp<TextStyle>;
8
+ textStyle?: StyleProp<TextStyle>;
9
+ text?: string | null;
10
+ iconName?: string;
9
11
  iconSize?: number;
10
12
  iconColor?: string;
11
13
  overlayOpacity?: number;
12
- contentVerticalAlign?: 'center' | 'top';
14
+ contentPosition?: "center" | "top-center" | "top-left" | "top-right";
15
+ contentPadding?: number;
13
16
  }
14
17
  declare const LockOverlay: React.FC<LockOverlayProps>;
15
18
  export default LockOverlay;
@@ -1 +1 @@
1
- {"version":3,"file":"LockOverlay.d.ts","sourceRoot":"","sources":["../../../../../src/components/LockOverlay/LockOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAIL,SAAS,EACT,SAAS,EAET,qBAAqB,EACtB,MAAM,cAAc,CAAC;AAItB,UAAU,gBAAiB,SAAQ,qBAAqB;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAG,QAAQ,GAAG,KAAK,CAAA;CACzC;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAoC3C,CAAC;AAoBF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"LockOverlay.d.ts","sourceRoot":"","sources":["../../../../../src/components/LockOverlay/LockOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAIL,SAAS,EACT,SAAS,EAET,qBAAqB,EACrB,SAAS,EACV,MAAM,cAAc,CAAC;AAItB,UAAU,gBAAiB,SAAQ,qBAAqB;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,qBAAqB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7C,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,QAAQ,GAAG,YAAY,GAAG,UAAU,GAAG,WAAW,CAAC;IACrE,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAgF3C,CAAC;AAuBF,eAAe,WAAW,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "related-ui-components",
3
- "version": "2.0.2",
4
- "main": "./lib\\module\\index.js",
3
+ "version": "2.0.3",
4
+ "main": "./src/index.ts",
5
5
  "scripts": {
6
6
  "start": "expo start",
7
7
  "android": "expo start --android",
package/src/app.tsx CHANGED
@@ -1,127 +1,30 @@
1
1
  import React, { useState } from "react";
2
- import { View, Button, Text } from "react-native";
3
- import {
4
- FilterResult,
5
- Filters,
6
- Popup,
7
- ScratchCard,
8
- ScratchCardContent,
9
- UnlockRewards,
10
- } from "./components";
11
- import BRANDS from "./constants/BRANDS";
12
- import { Ionicons } from "@expo/vector-icons";
13
- import { RelatedProvider, useTheme } from "./theme";
14
- import RedeemedVoucherSheet from "./components/RedeemedVoucher/RedeemedVoucherSheet";
15
- import { GestureHandlerRootView } from "react-native-gesture-handler";
2
+ import { SafeAreaView, Text } from "react-native";
3
+ import { SelaDealCard } from "./components";
4
+ import { RelatedProvider } from "./theme";
16
5
 
17
6
  const MyScreen = () => {
18
- const [isFilterVisible, setIsFilterVisible] = useState(false);
19
-
20
- const { theme } = useTheme();
21
-
22
- const handleApplyFilters = (result: FilterResult) => {
23
- console.log("Filters applied:", result);
24
- // Process filter results...
25
- };
26
-
27
- const rewardsData = [
28
- {
29
- icon: (
30
- <Ionicons name="briefcase-outline" size={30} color={theme.primary} />
31
- ),
32
- activeIcon: (
33
- <Ionicons name="briefcase-outline" size={30} color={theme.onPrimary} />
34
- ),
35
- title: "Aqua Guardian",
36
- description:
37
- "Maintain water usage below the community average for a month.",
38
- isActive: false,
39
- status: "0/1",
40
- statusBackgroundColor: "#FFCDD2",
41
- statusTextColor: "#D32F2F",
42
- },
43
- {
44
- icon: <Ionicons name="heart-outline" size={30} color={theme.primary} />,
45
- activeIcon: (
46
- <Ionicons name="heart-outline" size={30} color={theme.onPrimary} />
47
- ),
48
- title: "Wellness Warrior",
49
- description: "Complete 30 days of healthy hydration tracking.",
50
- isActive: true,
51
- status: "15/30",
52
- statusBackgroundColor: "#C8E6C9",
53
- statusTextColor: "#388E3C",
54
- },
55
- {
56
- icon: <Ionicons name="airplane-outline" size={24} color={theme.helper} />,
57
- activeIcon: (
58
- <Ionicons name="airplane-outline" size={24} color={theme.primary} />
59
- ),
60
- title: "Eco Traveler",
61
- description: "Log 5 trips where you chose sustainable travel options.",
62
- isActive: false,
63
- status: "2/5",
64
- statusBackgroundColor: theme.disabled,
65
- statusTextColor: theme.text,
66
- },
67
- {
68
- icon: <Ionicons name="school-outline" size={24} color={theme.helper} />,
69
- activeIcon: (
70
- <Ionicons name="school-outline" size={24} color={theme.primary} />
71
- ),
72
- title: "Knowledge Seeker",
73
- description: "Complete all water conservation learning modules.",
74
- isActive: false,
75
- status: "3/5",
76
- statusBackgroundColor: theme.disabled,
77
- statusTextColor: theme.text,
78
- },
79
- {
80
- icon: <Ionicons name="settings-outline" size={24} color={theme.helper} />,
81
- activeIcon: (
82
- <Ionicons name="settings-outline" size={24} color={theme.primary} />
83
- ),
84
- title: "Smart Saver",
85
- description: "Set up and use all water-saving features in the app.",
86
- isActive: true,
87
- status: "4/4",
88
- statusBackgroundColor: theme.primary,
89
- statusTextColor: theme.background,
90
- },
91
- ];
92
-
93
7
  return (
94
8
  <>
95
- <GestureHandlerRootView>
96
- <RelatedProvider>
97
- <Popup visible={true} onClose={()=>{}}>
98
- <ScratchCard
99
- backgroundColor="#8A2BE2"
100
- text="Scratch to reveal your prize!"
101
- textFontColor="#FFFFFF"
102
- textFontSize={18}
103
- // textFont={require("@/assets/fonts/SpaceMono-Regular.ttf")}
104
- width={300}
105
- height={150}
106
- gradient={{
107
- colors: ["#ff0000", "#00ff00", "#0000ff"],
108
- start: { x: 0, y: 0 },
109
- end: { x: 300, y: 300 },
110
- }}
111
- onScratched={() => alert("Congratulations! You won a prize!")}
112
- >
113
- <ScratchCardContent style={{ backgroundColor: "#FFD700" }}>
114
- <Text style={{ fontSize: 24, fontWeight: "bold", color: "#000" }}>
115
- 50% OFF COUPON
116
- </Text>
117
- <Text style={{ marginTop: 8, color: "#333" }}>
118
- Use code: SCRATCH50
119
- </Text>
120
- </ScratchCardContent>
121
- </ScratchCard>
122
- </Popup>
123
- </RelatedProvider>
124
- </GestureHandlerRootView>
9
+ <RelatedProvider>
10
+ <SafeAreaView style={{ padding: 50 }}>
11
+ <SelaDealCard
12
+ variant="horizontal"
13
+ isRTL
14
+ backgroundImage={require("./assets/images/namshi-banner.png")} // Your image for the horizontal card
15
+ label="Offer"
16
+ lockOverlay
17
+ providerName="Altanfeethi"
18
+ providerNameStyle={{ color: 'yellow' }} // Specific style for provider name
19
+ description="1 Year Membership"
20
+ descriptionStyle={{ color: 'white' }}
21
+ price="20,000 pts"
22
+ onPress={() => console.log("Horizontal Sela Card Pressed")}
23
+ width={320} // Example width
24
+ height={180} // Example height
25
+ />
26
+ </SafeAreaView>
27
+ </RelatedProvider>
125
28
  </>
126
29
  );
127
30
  };
@@ -225,7 +225,7 @@ const DealCardWithBackgroundImage: React.FC<DealCardProps> = ({
225
225
  <LockOverlay
226
226
  visible={overlayVisible}
227
227
  containerStyle={overlayStyle}
228
- contentVerticalAlign={overlayCover == "background" ? "top" : "center"}
228
+ contentPosition={overlayCover == "background" ? "center" : "top-center"}
229
229
  onPress={onOverlayPress}
230
230
  />
231
231
  <CardHeader