@umituz/react-native-subscription 2.2.6 → 2.2.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-subscription",
3
- "version": "2.2.6",
3
+ "version": "2.2.7",
4
4
  "description": "Complete subscription management with RevenueCat, paywall UI, and credits system for React Native apps",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -4,10 +4,10 @@
4
4
  */
5
5
 
6
6
  import React from "react";
7
- import { View, StyleSheet } from "react-native";
7
+ import { View, StyleSheet, TouchableOpacity, Linking } from "react-native";
8
8
  import { AtomicText } from "@umituz/react-native-design-system-atoms";
9
9
  import { useAppDesignTokens } from "@umituz/react-native-design-system-theme";
10
- import { LegalLinks } from "@umituz/react-native-legal";
10
+ // import { LegalLinks } from "@umituz/react-native-legal";
11
11
 
12
12
  interface PaywallLegalFooterProps {
13
13
  termsText?: string;
@@ -38,13 +38,33 @@ export const PaywallLegalFooter: React.FC<PaywallLegalFooterProps> = React.memo(
38
38
  >
39
39
  {termsText}
40
40
  </AtomicText>
41
- <LegalLinks
42
- style={styles.legalLinks}
43
- privacyPolicyUrl={privacyUrl}
44
- termsOfServiceUrl={termsUrl}
45
- privacyText={privacyText || "Privacy Policy"}
46
- termsText={termsOfServiceText || "Terms of Service"}
47
- />
41
+ <View style={styles.legalLinksContainer}>
42
+ {privacyUrl && (
43
+ <TouchableOpacity onPress={() => Linking.openURL(privacyUrl).catch(console.error)}>
44
+ <AtomicText
45
+ type="labelSmall"
46
+ style={[styles.linkText, { color: tokens.colors.textSecondary }]}
47
+ >
48
+ {privacyText || "Privacy Policy"}
49
+ </AtomicText>
50
+ </TouchableOpacity>
51
+ )}
52
+ {privacyUrl && termsUrl && (
53
+ <AtomicText type="labelSmall" style={{ color: tokens.colors.textTertiary }}>
54
+ {" • "}
55
+ </AtomicText>
56
+ )}
57
+ {termsUrl && (
58
+ <TouchableOpacity onPress={() => Linking.openURL(termsUrl).catch(console.error)}>
59
+ <AtomicText
60
+ type="labelSmall"
61
+ style={[styles.linkText, { color: tokens.colors.textSecondary }]}
62
+ >
63
+ {termsOfServiceText || "Terms of Service"}
64
+ </AtomicText>
65
+ </TouchableOpacity>
66
+ )}
67
+ </View>
48
68
  </View>
49
69
  );
50
70
  }
@@ -64,7 +84,12 @@ const styles = StyleSheet.create({
64
84
  lineHeight: 16,
65
85
  marginBottom: 8,
66
86
  },
67
- legalLinks: {
87
+ legalLinksContainer: {
88
+ flexDirection: "row",
89
+ alignItems: "center",
68
90
  marginTop: 4,
69
91
  },
92
+ linkText: {
93
+ textDecorationLine: "underline",
94
+ },
70
95
  });