@umituz/react-native-subscription 2.2.28 → 2.2.29

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.28",
3
+ "version": "2.2.29",
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",
@@ -12,14 +12,17 @@ interface PaywallHeaderProps {
12
12
  title: string;
13
13
  subtitle?: string;
14
14
  onClose: () => void;
15
+ variant?: "bottom-sheet" | "fullscreen" | "dialog";
15
16
  }
16
17
 
17
18
  export const PaywallHeader: React.FC<PaywallHeaderProps> = React.memo(
18
- ({ title, subtitle, onClose }) => {
19
+ ({ title, subtitle, onClose, variant = "bottom-sheet" }) => {
19
20
  const tokens = useAppDesignTokens();
20
21
 
22
+ const containerStyle = variant === "fullscreen" ? styles.containerFullscreen : styles.container;
23
+
21
24
  return (
22
- <View style={styles.container}>
25
+ <View style={containerStyle}>
23
26
  <View style={styles.titleContainer}>
24
27
  <AtomicText
25
28
  type="headlineLarge"
@@ -62,6 +65,14 @@ const styles = StyleSheet.create({
62
65
  paddingTop: 8,
63
66
  paddingBottom: 16,
64
67
  },
68
+ containerFullscreen: {
69
+ flexDirection: "row",
70
+ justifyContent: "space-between",
71
+ alignItems: "flex-start",
72
+ paddingHorizontal: 24,
73
+ paddingTop: 48,
74
+ paddingBottom: 16,
75
+ },
65
76
  titleContainer: {
66
77
  flex: 1,
67
78
  marginRight: 16,
@@ -110,6 +110,7 @@ export const PaywallModal: React.FC<PaywallModalProps> = React.memo(
110
110
  title={displayTitle}
111
111
  subtitle={displaySubtitle}
112
112
  onClose={onClose}
113
+ variant="fullscreen"
113
114
  />
114
115
 
115
116
  <PaywallTabBar
@@ -84,7 +84,7 @@ export const SubscriptionModal: React.FC<SubscriptionModalProps> = React.memo((p
84
84
  return (
85
85
  <SubscriptionModalOverlay visible={visible} onClose={onClose} variant={variant}>
86
86
  <ContentWrapper style={containerStyle}>
87
- <SubscriptionModalHeader title={title} subtitle={subtitle} onClose={onClose} />
87
+ <SubscriptionModalHeader title={title} subtitle={subtitle} onClose={onClose} variant={variant} />
88
88
 
89
89
  <ScrollView
90
90
  style={styles.scrollView}
@@ -11,12 +11,14 @@ interface SubscriptionModalHeaderProps {
11
11
  title: string;
12
12
  subtitle?: string;
13
13
  onClose: () => void;
14
+ variant?: "bottom-sheet" | "fullscreen" | "dialog";
14
15
  }
15
16
 
16
17
  export const SubscriptionModalHeader: React.FC<SubscriptionModalHeaderProps> = ({
17
18
  title,
18
19
  subtitle,
19
20
  onClose,
21
+ variant = "bottom-sheet",
20
22
  }) => {
21
23
  const tokens = useAppDesignTokens();
22
24
 
@@ -24,8 +26,10 @@ export const SubscriptionModalHeader: React.FC<SubscriptionModalHeaderProps> = (
24
26
  console.log("[SubscriptionModalHeader] Rendering title:", title);
25
27
  }
26
28
 
29
+ const headerStyle = variant === "fullscreen" ? styles.headerFullscreen : styles.header;
30
+
27
31
  return (
28
- <View style={styles.header}>
32
+ <View style={headerStyle}>
29
33
  <TouchableOpacity
30
34
  style={styles.closeButton}
31
35
  onPress={onClose}
@@ -60,6 +64,12 @@ const styles = StyleSheet.create({
60
64
  paddingTop: 8,
61
65
  paddingBottom: 16,
62
66
  },
67
+ headerFullscreen: {
68
+ alignItems: "center",
69
+ paddingHorizontal: 24,
70
+ paddingTop: 48,
71
+ paddingBottom: 16,
72
+ },
63
73
  closeButton: {
64
74
  position: "absolute",
65
75
  top: 8,