@umituz/react-native-subscription 2.27.118 → 2.27.120
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.27.
|
|
3
|
+
"version": "2.27.120",
|
|
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",
|
|
@@ -58,9 +58,9 @@ export const PremiumStatusBadge: React.FC<PremiumStatusBadgeProps> = ({
|
|
|
58
58
|
() =>
|
|
59
59
|
StyleSheet.create({
|
|
60
60
|
badge: {
|
|
61
|
-
paddingHorizontal: tokens.spacing.
|
|
61
|
+
paddingHorizontal: tokens.spacing.md,
|
|
62
62
|
paddingVertical: tokens.spacing.xs,
|
|
63
|
-
borderRadius: tokens.radius.
|
|
63
|
+
borderRadius: tokens.radius.full,
|
|
64
64
|
backgroundColor,
|
|
65
65
|
},
|
|
66
66
|
badgeText: {
|
|
@@ -8,7 +8,10 @@ import React, { useMemo } from "react";
|
|
|
8
8
|
import { StyleSheet, View } from "react-native";
|
|
9
9
|
import {
|
|
10
10
|
useAppDesignTokens,
|
|
11
|
+
NavigationHeader,
|
|
12
|
+
AtomicIcon,
|
|
11
13
|
} from "@umituz/react-native-design-system";
|
|
14
|
+
import { Pressable } from "react-native";
|
|
12
15
|
import { ScreenLayout } from "../../../../shared/presentation";
|
|
13
16
|
import { SubscriptionHeader } from "./components/SubscriptionHeader";
|
|
14
17
|
import { CreditsList, type CreditItem } from "./components/CreditsList";
|
|
@@ -55,6 +58,7 @@ export interface SubscriptionDetailConfig {
|
|
|
55
58
|
credits?: readonly CreditItem[];
|
|
56
59
|
translations: SubscriptionDetailTranslations;
|
|
57
60
|
upgradePrompt?: UpgradePromptConfig;
|
|
61
|
+
onClose?: () => void;
|
|
58
62
|
}
|
|
59
63
|
|
|
60
64
|
export interface SubscriptionDetailScreenProps {
|
|
@@ -76,11 +80,7 @@ export const SubscriptionDetailScreen: React.FC<
|
|
|
76
80
|
gap: tokens.spacing.lg,
|
|
77
81
|
},
|
|
78
82
|
cardsContainer: {
|
|
79
|
-
gap: tokens.spacing.
|
|
80
|
-
},
|
|
81
|
-
spacer: {
|
|
82
|
-
flex: 1,
|
|
83
|
-
minHeight: tokens.spacing.xl,
|
|
83
|
+
gap: tokens.spacing.xl,
|
|
84
84
|
},
|
|
85
85
|
}),
|
|
86
86
|
[tokens]
|
|
@@ -89,10 +89,30 @@ export const SubscriptionDetailScreen: React.FC<
|
|
|
89
89
|
return (
|
|
90
90
|
<ScreenLayout
|
|
91
91
|
scrollable={true}
|
|
92
|
-
edges={["bottom"]}
|
|
92
|
+
edges={config.onClose ? ["bottom"] : ["top", "bottom"]}
|
|
93
93
|
backgroundColor={tokens.colors.backgroundPrimary}
|
|
94
94
|
contentContainerStyle={styles.content}
|
|
95
95
|
>
|
|
96
|
+
{config.onClose && (
|
|
97
|
+
<NavigationHeader
|
|
98
|
+
title={config.translations.title}
|
|
99
|
+
rightElement={
|
|
100
|
+
<Pressable
|
|
101
|
+
onPress={config.onClose}
|
|
102
|
+
style={({ pressed }) => ({
|
|
103
|
+
width: 44,
|
|
104
|
+
height: 44,
|
|
105
|
+
justifyContent: "center",
|
|
106
|
+
alignItems: "center",
|
|
107
|
+
backgroundColor: pressed ? tokens.colors.surfaceVariant : tokens.colors.surface,
|
|
108
|
+
borderRadius: tokens.radius.full,
|
|
109
|
+
})}
|
|
110
|
+
>
|
|
111
|
+
<AtomicIcon name="close-outline" customSize={24} color="textPrimary" />
|
|
112
|
+
</Pressable>
|
|
113
|
+
}
|
|
114
|
+
/>
|
|
115
|
+
)}
|
|
96
116
|
<View style={styles.cardsContainer}>
|
|
97
117
|
{showHeader && (
|
|
98
118
|
<SubscriptionHeader
|
|
@@ -128,7 +148,7 @@ export const SubscriptionDetailScreen: React.FC<
|
|
|
128
148
|
)}
|
|
129
149
|
</View>
|
|
130
150
|
|
|
131
|
-
|
|
151
|
+
|
|
132
152
|
</ScreenLayout>
|
|
133
153
|
);
|
|
134
154
|
};
|