@umituz/react-native-subscription 2.38.3 → 2.39.0
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 +1 -1
- package/src/domains/subscription/presentation/components/feedback/PaywallFeedbackScreen.tsx +6 -2
- package/src/index.ts +0 -1
- package/src/presentation/hooks/feedback/usePaywallFeedback.ts +5 -7
- package/src/domains/paywall/components/PaywallModal.styles.ts +0 -48
- package/src/domains/paywall/components/PaywallModal.tsx +0 -111
- package/src/domains/paywall/components/PaywallModal.types.ts +0 -24
- package/src/domains/subscription/presentation/components/feedback/PaywallFeedbackModal.tsx +0 -91
- package/src/domains/subscription/presentation/components/feedback/PaywallFeedbackModal.types.ts +0 -20
- package/src/domains/subscription/presentation/components/feedback/paywallFeedbackStyles.ts +0 -27
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-subscription",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.39.0",
|
|
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",
|
|
@@ -7,13 +7,17 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import React, { useMemo, useCallback } from "react";
|
|
10
|
-
import { View, ScrollView, TouchableOpacity, StyleSheet
|
|
10
|
+
import { View, ScrollView, TouchableOpacity, StyleSheet } from "react-native";
|
|
11
11
|
import { AtomicText, AtomicIcon } from "@umituz/react-native-design-system/atoms";
|
|
12
12
|
import { useSafeAreaInsets } from "@umituz/react-native-design-system/safe-area";
|
|
13
13
|
import { useAppDesignTokens } from "@umituz/react-native-design-system/theme";
|
|
14
14
|
import { usePaywallFeedback } from "../../../../../presentation/hooks/feedback/usePaywallFeedback";
|
|
15
15
|
import { FeedbackOption } from "./FeedbackOption";
|
|
16
16
|
import type { PaywallFeedbackScreenProps } from "./PaywallFeedbackScreen.types";
|
|
17
|
+
import type { PaywallFeedbackTranslations } from "./PaywallFeedbackModal.types";
|
|
18
|
+
|
|
19
|
+
// Re-export translations type for convenience
|
|
20
|
+
export type { PaywallFeedbackTranslations, PaywallFeedbackScreenProps };
|
|
17
21
|
|
|
18
22
|
const FEEDBACK_OPTION_IDS = [
|
|
19
23
|
"too_expensive",
|
|
@@ -188,6 +192,6 @@ const createScreenStyles = (tokens: any, insets: any) => ({
|
|
|
188
192
|
alignItems: 'center' as const,
|
|
189
193
|
},
|
|
190
194
|
submitText: {
|
|
191
|
-
fontWeight:
|
|
195
|
+
fontWeight: 600,
|
|
192
196
|
},
|
|
193
197
|
});
|
package/src/index.ts
CHANGED
|
@@ -52,7 +52,6 @@ export * from "./domains/subscription/presentation/components/details/PremiumDet
|
|
|
52
52
|
export { PremiumStatusBadge } from "./domains/subscription/presentation/components/details/PremiumStatusBadge";
|
|
53
53
|
export type { PremiumStatusBadgeProps } from "./domains/subscription/presentation/components/details/PremiumStatusBadge.types";
|
|
54
54
|
export * from "./domains/subscription/presentation/components/sections/SubscriptionSection";
|
|
55
|
-
export * from "./domains/subscription/presentation/components/feedback/PaywallFeedbackModal";
|
|
56
55
|
export * from "./domains/subscription/presentation/components/feedback/PaywallFeedbackScreen";
|
|
57
56
|
export * from "./domains/subscription/presentation/screens/SubscriptionDetailScreen";
|
|
58
57
|
export type {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState, useCallback } from "react";
|
|
2
2
|
|
|
3
3
|
interface UsePaywallFeedbackProps {
|
|
4
|
-
onSubmit: (reason: string) => void;
|
|
4
|
+
onSubmit: (data: { reason: string; otherText?: string }) => void;
|
|
5
5
|
onClose: () => void;
|
|
6
6
|
}
|
|
7
7
|
|
|
@@ -15,12 +15,10 @@ export const usePaywallFeedback = ({
|
|
|
15
15
|
const handleSubmit = useCallback(() => {
|
|
16
16
|
if (!selectedReason) return;
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
selectedReason
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
onSubmit(finalReason);
|
|
18
|
+
onSubmit({
|
|
19
|
+
reason: selectedReason,
|
|
20
|
+
otherText: selectedReason === "other" ? otherText.trim() : undefined,
|
|
21
|
+
});
|
|
24
22
|
setSelectedReason(null);
|
|
25
23
|
setOtherText("");
|
|
26
24
|
onClose();
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { StyleSheet } from "react-native";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export const paywallModalStyles = StyleSheet.create({
|
|
5
|
-
modalContent: { padding: 0, borderWidth: 0, overflow: "hidden" },
|
|
6
|
-
container: { flex: 1, flexDirection: "column" as const },
|
|
7
|
-
scrollContainer: { flex: 1, flexShrink: 1 },
|
|
8
|
-
closeBtn: {
|
|
9
|
-
position: "absolute",
|
|
10
|
-
top: 12,
|
|
11
|
-
right: 12,
|
|
12
|
-
width: 32,
|
|
13
|
-
height: 32,
|
|
14
|
-
borderRadius: 16,
|
|
15
|
-
justifyContent: "center",
|
|
16
|
-
alignItems: "center",
|
|
17
|
-
zIndex: 10,
|
|
18
|
-
},
|
|
19
|
-
scroll: { flexGrow: 1, padding: 16, paddingTop: 16, paddingBottom: 32 },
|
|
20
|
-
heroContainer: { alignItems: "center", marginBottom: 20, marginTop: 32 },
|
|
21
|
-
heroImage: { width: 180, height: 180, borderRadius: 90 },
|
|
22
|
-
header: { alignItems: "center", marginBottom: 12 },
|
|
23
|
-
title: { fontWeight: "700", textAlign: "center", marginBottom: 4 },
|
|
24
|
-
subtitle: { textAlign: "center" },
|
|
25
|
-
features: { borderRadius: 12, padding: 12, marginBottom: 12, gap: 8 },
|
|
26
|
-
featureRow: { flexDirection: "row", alignItems: "center" },
|
|
27
|
-
featureIcon: {
|
|
28
|
-
width: 32,
|
|
29
|
-
height: 32,
|
|
30
|
-
borderRadius: 16,
|
|
31
|
-
justifyContent: "center",
|
|
32
|
-
alignItems: "center",
|
|
33
|
-
marginRight: 8,
|
|
34
|
-
},
|
|
35
|
-
featureText: { flex: 1, fontWeight: "500" },
|
|
36
|
-
loading: { alignItems: "center", paddingVertical: 24 },
|
|
37
|
-
loadingText: { marginTop: 8 },
|
|
38
|
-
plans: { marginBottom: 12 },
|
|
39
|
-
stickyFooter: { flexShrink: 0, paddingHorizontal: 16, paddingTop: 12, borderTopWidth: StyleSheet.hairlineWidth, borderTopColor: "rgba(128,128,128,0.2)" },
|
|
40
|
-
cta: { borderRadius: 12, paddingVertical: 14, alignItems: "center", marginBottom: 12 },
|
|
41
|
-
ctaDisabled: { opacity: 0.5 },
|
|
42
|
-
ctaText: { fontWeight: "700" },
|
|
43
|
-
footer: { flexDirection: "column", alignItems: "center", gap: 8 },
|
|
44
|
-
restoreButton: { marginBottom: 8 },
|
|
45
|
-
restoreButtonDisabled: { opacity: 0.5 },
|
|
46
|
-
legalRow: { flexDirection: "row", justifyContent: "center", gap: 16 },
|
|
47
|
-
footerLink: {},
|
|
48
|
-
});
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useEffect } from "react";
|
|
2
|
-
import { View, ScrollView, TouchableOpacity, Linking } from "react-native";
|
|
3
|
-
import { AtomicText, AtomicIcon, AtomicSpinner } from "@umituz/react-native-design-system/atoms";
|
|
4
|
-
import { BaseModal } from "@umituz/react-native-design-system/molecules";
|
|
5
|
-
import { useSafeAreaInsets } from "@umituz/react-native-design-system/safe-area";
|
|
6
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system/theme";
|
|
7
|
-
import { Image } from "expo-image";
|
|
8
|
-
import { PlanCard } from "./PlanCard";
|
|
9
|
-
import { paywallModalStyles as styles } from "./PaywallModal.styles";
|
|
10
|
-
import { PaywallFeatures } from "./PaywallFeatures";
|
|
11
|
-
import { PaywallFooter } from "./PaywallFooter";
|
|
12
|
-
import { usePaywallActions } from "../hooks/usePaywallActions";
|
|
13
|
-
import { PaywallModalProps } from "./PaywallModal.types";
|
|
14
|
-
|
|
15
|
-
export const PaywallModal: React.FC<PaywallModalProps> = React.memo((props) => {
|
|
16
|
-
const { visible, onClose, translations, packages = [], features = [], legalUrls = {}, bestValueIdentifier, creditAmounts, creditsLabel, heroImage, onPurchase, onRestore, onPurchaseSuccess, onPurchaseError, onAuthRequired, source, isLoadingPackages } = props;
|
|
17
|
-
const tokens = useAppDesignTokens();
|
|
18
|
-
const insets = useSafeAreaInsets();
|
|
19
|
-
|
|
20
|
-
if (__DEV__) {
|
|
21
|
-
console.log("[PaywallModal] Render:", {
|
|
22
|
-
visible,
|
|
23
|
-
packagesCount: packages.length,
|
|
24
|
-
isLoadingPackages,
|
|
25
|
-
source,
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const { selectedPlanId, setSelectedPlanId, isProcessing, handlePurchase, handleRestore, resetState } = usePaywallActions({
|
|
30
|
-
packages,
|
|
31
|
-
onPurchase,
|
|
32
|
-
onRestore,
|
|
33
|
-
source,
|
|
34
|
-
onPurchaseSuccess,
|
|
35
|
-
onPurchaseError,
|
|
36
|
-
onAuthRequired,
|
|
37
|
-
onClose
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
useEffect(() => {
|
|
41
|
-
if (!visible) resetState();
|
|
42
|
-
}, [visible, resetState]);
|
|
43
|
-
|
|
44
|
-
// Auto-select first package when packages load and none is selected
|
|
45
|
-
useEffect(() => {
|
|
46
|
-
if (packages.length > 0 && !selectedPlanId) {
|
|
47
|
-
setSelectedPlanId(packages[0].product.identifier);
|
|
48
|
-
}
|
|
49
|
-
}, [packages, selectedPlanId, setSelectedPlanId]);
|
|
50
|
-
|
|
51
|
-
const handleLegalUrl = useCallback(async (url: string | undefined) => {
|
|
52
|
-
if (!url) return;
|
|
53
|
-
try {
|
|
54
|
-
if (await Linking.canOpenURL(url)) await Linking.openURL(url);
|
|
55
|
-
} catch (error) {
|
|
56
|
-
console.error('[PaywallModal] Failed to open URL:', error instanceof Error ? error.message : String(error));
|
|
57
|
-
}
|
|
58
|
-
}, []);
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return (
|
|
62
|
-
<BaseModal visible={visible} onClose={onClose} contentStyle={styles.modalContent}>
|
|
63
|
-
<View style={[styles.container, { backgroundColor: tokens.colors.surface }]}>
|
|
64
|
-
<TouchableOpacity onPress={onClose} style={[styles.closeBtn, { backgroundColor: tokens.colors.surfaceSecondary, top: Math.max(insets.top, 12) }]} hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}>
|
|
65
|
-
<AtomicIcon name="close-outline" size="md" customColor={tokens.colors.textPrimary} />
|
|
66
|
-
</TouchableOpacity>
|
|
67
|
-
|
|
68
|
-
{/* Scrollable content — plan cards scroll, CTA is always pinned below */}
|
|
69
|
-
<ScrollView style={styles.scrollContainer} contentContainerStyle={styles.scroll} showsVerticalScrollIndicator={false}>
|
|
70
|
-
{heroImage && <View style={styles.heroContainer}><Image source={heroImage} style={styles.heroImage} contentFit="cover" transition={0} /></View>}
|
|
71
|
-
<View style={styles.header}>
|
|
72
|
-
<AtomicText type="headlineMedium" adjustsFontSizeToFit numberOfLines={2} minimumFontScale={0.75} style={[styles.title, { color: tokens.colors.textPrimary }]}>{translations.title}</AtomicText>
|
|
73
|
-
{translations.subtitle && <AtomicText type="bodyMedium" adjustsFontSizeToFit numberOfLines={3} minimumFontScale={0.8} style={[styles.subtitle, { color: tokens.colors.textSecondary }]}>{translations.subtitle}</AtomicText>}
|
|
74
|
-
</View>
|
|
75
|
-
<PaywallFeatures features={features} />
|
|
76
|
-
<View style={styles.plans}>
|
|
77
|
-
{isLoadingPackages ? (
|
|
78
|
-
<View style={styles.loading}>
|
|
79
|
-
<AtomicSpinner size="md" />
|
|
80
|
-
{translations.processingText && (
|
|
81
|
-
<AtomicText type="bodySmall" style={[styles.loadingText, { color: tokens.colors.textSecondary }]}>{translations.processingText}</AtomicText>
|
|
82
|
-
)}
|
|
83
|
-
</View>
|
|
84
|
-
) : packages.length === 0 ? (
|
|
85
|
-
<View style={styles.loading}>
|
|
86
|
-
<AtomicText type="bodyMedium" style={{ color: tokens.colors.textSecondary, textAlign: "center" }}>{translations.emptyText ?? "No packages available"}</AtomicText>
|
|
87
|
-
</View>
|
|
88
|
-
) : (
|
|
89
|
-
packages.map((pkg) => {
|
|
90
|
-
const pid = pkg.product.identifier;
|
|
91
|
-
return (
|
|
92
|
-
<PlanCard key={pid} pkg={pkg} isSelected={selectedPlanId === pid} onSelect={() => setSelectedPlanId(pid)} badge={pid === bestValueIdentifier ? translations.bestValueBadgeText : undefined} creditAmount={creditAmounts?.[pid]} creditsLabel={creditsLabel} />
|
|
93
|
-
);
|
|
94
|
-
})
|
|
95
|
-
)}
|
|
96
|
-
</View>
|
|
97
|
-
</ScrollView>
|
|
98
|
-
|
|
99
|
-
{/* Sticky footer — always visible, never hidden behind scroll content */}
|
|
100
|
-
<View style={[styles.stickyFooter, { paddingBottom: Math.max(insets.bottom, 16) }]}>
|
|
101
|
-
<TouchableOpacity onPress={handlePurchase} disabled={isProcessing || isLoadingPackages || !selectedPlanId} style={[styles.cta, { backgroundColor: tokens.colors.primary }, (isProcessing || isLoadingPackages || !selectedPlanId) && styles.ctaDisabled]} activeOpacity={0.75}>
|
|
102
|
-
<AtomicText type="titleLarge" style={[styles.ctaText, { color: tokens.colors.onPrimary }]}>{isProcessing ? translations.processingText : translations.purchaseButtonText}</AtomicText>
|
|
103
|
-
</TouchableOpacity>
|
|
104
|
-
<PaywallFooter translations={translations} legalUrls={legalUrls} isProcessing={isProcessing} onRestore={onRestore ? handleRestore : undefined} onLegalClick={handleLegalUrl} />
|
|
105
|
-
</View>
|
|
106
|
-
</View>
|
|
107
|
-
</BaseModal>
|
|
108
|
-
);
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
PaywallModal.displayName = "PaywallModal";
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { ImageSourcePropType } from "react-native";
|
|
2
|
-
import type { PurchasesPackage } from "react-native-purchases";
|
|
3
|
-
import type { SubscriptionFeature, PaywallTranslations, PaywallLegalUrls } from "../entities/types";
|
|
4
|
-
import type { PurchaseSource } from "../../subscription/core/SubscriptionConstants";
|
|
5
|
-
|
|
6
|
-
export interface PaywallModalProps {
|
|
7
|
-
visible: boolean;
|
|
8
|
-
onClose: () => void;
|
|
9
|
-
translations: PaywallTranslations;
|
|
10
|
-
packages?: PurchasesPackage[];
|
|
11
|
-
features?: SubscriptionFeature[];
|
|
12
|
-
legalUrls?: PaywallLegalUrls;
|
|
13
|
-
bestValueIdentifier?: string;
|
|
14
|
-
creditAmounts?: Record<string, number>;
|
|
15
|
-
creditsLabel?: string;
|
|
16
|
-
heroImage?: ImageSourcePropType;
|
|
17
|
-
onPurchase?: (pkg: PurchasesPackage) => Promise<void | boolean>;
|
|
18
|
-
onRestore?: () => Promise<void | boolean>;
|
|
19
|
-
onPurchaseSuccess?: () => void;
|
|
20
|
-
onPurchaseError?: (error: Error | string) => void;
|
|
21
|
-
onAuthRequired?: () => void;
|
|
22
|
-
source?: PurchaseSource;
|
|
23
|
-
isLoadingPackages?: boolean;
|
|
24
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from "react";
|
|
2
|
-
import { View, TouchableOpacity } from "react-native";
|
|
3
|
-
import { AtomicText } from "@umituz/react-native-design-system/atoms";
|
|
4
|
-
import { BaseModal } from "@umituz/react-native-design-system/molecules";
|
|
5
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system/theme";
|
|
6
|
-
import { usePaywallFeedback } from "../../../../../presentation/hooks/feedback/usePaywallFeedback";
|
|
7
|
-
import { createPaywallFeedbackStyles } from "./paywallFeedbackStyles";
|
|
8
|
-
import { FeedbackOption } from "./FeedbackOption";
|
|
9
|
-
import type { PaywallFeedbackTranslations, PaywallFeedbackModalProps } from "./PaywallFeedbackModal.types";
|
|
10
|
-
|
|
11
|
-
export type { PaywallFeedbackTranslations, PaywallFeedbackModalProps };
|
|
12
|
-
|
|
13
|
-
const FEEDBACK_OPTION_IDS = [
|
|
14
|
-
"too_expensive",
|
|
15
|
-
"no_need",
|
|
16
|
-
"trying_out",
|
|
17
|
-
"technical_issues",
|
|
18
|
-
"other",
|
|
19
|
-
] as const;
|
|
20
|
-
|
|
21
|
-
export const PaywallFeedbackModal: React.FC<PaywallFeedbackModalProps> = React.memo(({
|
|
22
|
-
translations,
|
|
23
|
-
visible,
|
|
24
|
-
onClose,
|
|
25
|
-
onSubmit,
|
|
26
|
-
}) => {
|
|
27
|
-
const tokens = useAppDesignTokens();
|
|
28
|
-
|
|
29
|
-
const {
|
|
30
|
-
selectedReason,
|
|
31
|
-
otherText,
|
|
32
|
-
setOtherText,
|
|
33
|
-
selectReason,
|
|
34
|
-
handleSubmit,
|
|
35
|
-
handleSkip,
|
|
36
|
-
canSubmit,
|
|
37
|
-
} = usePaywallFeedback({ onSubmit, onClose });
|
|
38
|
-
|
|
39
|
-
const styles = useMemo(
|
|
40
|
-
() => createPaywallFeedbackStyles(tokens, canSubmit),
|
|
41
|
-
[tokens, canSubmit],
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
return (
|
|
45
|
-
<BaseModal
|
|
46
|
-
visible={visible}
|
|
47
|
-
onClose={handleSkip}
|
|
48
|
-
title={translations.title}
|
|
49
|
-
subtitle={translations.subtitle}
|
|
50
|
-
>
|
|
51
|
-
<View style={{ paddingHorizontal: tokens.spacing.md, paddingBottom: tokens.spacing.lg }}>
|
|
52
|
-
<View style={[styles.optionsContainer, { backgroundColor: 'transparent', padding: 0 }]}>
|
|
53
|
-
{FEEDBACK_OPTION_IDS.map((optionId) => {
|
|
54
|
-
const isSelected = selectedReason === optionId;
|
|
55
|
-
const isOther = optionId === "other";
|
|
56
|
-
const showInput = isSelected && isOther;
|
|
57
|
-
|
|
58
|
-
return (
|
|
59
|
-
<FeedbackOption
|
|
60
|
-
key={optionId}
|
|
61
|
-
isSelected={isSelected}
|
|
62
|
-
text={translations.reasons[optionId]}
|
|
63
|
-
showInput={showInput}
|
|
64
|
-
placeholder={translations.otherPlaceholder}
|
|
65
|
-
inputValue={otherText}
|
|
66
|
-
onSelect={() => selectReason(optionId)}
|
|
67
|
-
onChangeText={setOtherText}
|
|
68
|
-
/>
|
|
69
|
-
);
|
|
70
|
-
})}
|
|
71
|
-
</View>
|
|
72
|
-
|
|
73
|
-
<TouchableOpacity
|
|
74
|
-
style={[styles.submitButton, { marginTop: tokens.spacing.lg }]}
|
|
75
|
-
onPress={handleSubmit}
|
|
76
|
-
disabled={!canSubmit}
|
|
77
|
-
activeOpacity={0.8}
|
|
78
|
-
>
|
|
79
|
-
<AtomicText type="labelLarge" style={styles.submitText}>
|
|
80
|
-
{translations.submit}
|
|
81
|
-
</AtomicText>
|
|
82
|
-
</TouchableOpacity>
|
|
83
|
-
</View>
|
|
84
|
-
</BaseModal>
|
|
85
|
-
);
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
PaywallFeedbackModal.displayName = "PaywallFeedbackModal";
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
package/src/domains/subscription/presentation/components/feedback/PaywallFeedbackModal.types.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export interface PaywallFeedbackTranslations {
|
|
2
|
-
title: string;
|
|
3
|
-
subtitle: string;
|
|
4
|
-
submit: string;
|
|
5
|
-
otherPlaceholder: string;
|
|
6
|
-
reasons: {
|
|
7
|
-
too_expensive: string;
|
|
8
|
-
no_need: string;
|
|
9
|
-
trying_out: string;
|
|
10
|
-
technical_issues: string;
|
|
11
|
-
other: string;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface PaywallFeedbackModalProps {
|
|
16
|
-
translations: PaywallFeedbackTranslations;
|
|
17
|
-
visible: boolean;
|
|
18
|
-
onClose: () => void;
|
|
19
|
-
onSubmit: (reason: string) => void;
|
|
20
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { StyleSheet } from "react-native";
|
|
2
|
-
import type { DesignTokens } from "@umituz/react-native-design-system/theme";
|
|
3
|
-
|
|
4
|
-
export const createPaywallFeedbackStyles = (
|
|
5
|
-
tokens: DesignTokens,
|
|
6
|
-
canSubmit: boolean
|
|
7
|
-
) => {
|
|
8
|
-
return StyleSheet.create({
|
|
9
|
-
optionsContainer: {
|
|
10
|
-
backgroundColor: tokens.colors.surfaceSecondary,
|
|
11
|
-
borderRadius: 16,
|
|
12
|
-
overflow: "hidden",
|
|
13
|
-
marginBottom: 20,
|
|
14
|
-
},
|
|
15
|
-
submitButton: {
|
|
16
|
-
backgroundColor: canSubmit ? tokens.colors.primary : tokens.colors.surfaceSecondary,
|
|
17
|
-
borderRadius: 14,
|
|
18
|
-
paddingVertical: 16,
|
|
19
|
-
alignItems: "center",
|
|
20
|
-
opacity: canSubmit ? 1 : 0.6,
|
|
21
|
-
},
|
|
22
|
-
submitText: {
|
|
23
|
-
color: canSubmit ? tokens.colors.onPrimary : tokens.colors.textDisabled,
|
|
24
|
-
fontWeight: "600",
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
};
|