@umituz/react-native-subscription 2.2.5 → 2.2.6

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.5",
3
+ "version": "2.2.6",
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",
@@ -39,6 +39,7 @@ export interface SubscriptionModalProps {
39
39
  termsUrl?: string;
40
40
  privacyText?: string;
41
41
  termsOfServiceText?: string;
42
+ showRestoreButton?: boolean;
42
43
  }
43
44
 
44
45
  export const SubscriptionModal: React.FC<SubscriptionModalProps> = React.memo(
@@ -61,6 +62,7 @@ export const SubscriptionModal: React.FC<SubscriptionModalProps> = React.memo(
61
62
  termsUrl,
62
63
  privacyText,
63
64
  termsOfServiceText,
65
+ showRestoreButton = true,
64
66
  }) => {
65
67
  const tokens = useAppDesignTokens();
66
68
  const [selectedPkg, setSelectedPkg] = useState<PurchasesPackage | null>(null);
@@ -170,15 +172,17 @@ export const SubscriptionModal: React.FC<SubscriptionModalProps> = React.memo(
170
172
  disabled={!selectedPkg || isProcessing || isLoading}
171
173
  />
172
174
  )}
173
- <TouchableOpacity
174
- style={styles.restoreButton}
175
- onPress={handleRestore}
176
- disabled={isProcessing || isLoading}
177
- >
178
- <AtomicText type="bodySmall" style={{ color: tokens.colors.textSecondary }}>
179
- {restoreButtonText}
180
- </AtomicText>
181
- </TouchableOpacity>
175
+ {showRestoreButton && (
176
+ <TouchableOpacity
177
+ style={styles.restoreButton}
178
+ onPress={handleRestore}
179
+ disabled={isProcessing || isLoading}
180
+ >
181
+ <AtomicText type="bodySmall" style={{ color: tokens.colors.textSecondary }}>
182
+ {restoreButtonText}
183
+ </AtomicText>
184
+ </TouchableOpacity>
185
+ )}
182
186
  </View>
183
187
 
184
188
  <PaywallLegalFooter