@umituz/react-native-settings 4.20.32 → 4.20.34

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-settings",
3
- "version": "4.20.32",
3
+ "version": "4.20.34",
4
4
  "description": "Complete settings hub for React Native apps - consolidated package with settings, about, legal, appearance, feedback, FAQs, and rating",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Account Screen
3
+ * User account management screen
4
+ */
5
+
6
+ import React from "react";
7
+ import { View, ScrollView, StyleSheet } from "react-native";
8
+ import { useSafeAreaInsets } from "react-native-safe-area-context";
9
+ import { useAppDesignTokens } from "@umituz/react-native-design-system";
10
+ import { SettingsSection } from "../components/SettingsSection";
11
+ import { SettingsItem } from "../components/SettingsItem";
12
+
13
+ export interface AccountScreenConfig {
14
+ readonly onDeleteAccount?: () => void | Promise<void>;
15
+ readonly onSignOut?: () => void | Promise<void>;
16
+ readonly showDeleteAccount?: boolean;
17
+ readonly showSignOut?: boolean;
18
+ readonly t: (key: string) => string;
19
+ }
20
+
21
+ interface AccountScreenProps {
22
+ readonly config: AccountScreenConfig;
23
+ }
24
+
25
+ export const AccountScreen: React.FC<AccountScreenProps> = ({ config }) => {
26
+ const insets = useSafeAreaInsets();
27
+ const tokens = useAppDesignTokens();
28
+
29
+ const {
30
+ onDeleteAccount,
31
+ onSignOut,
32
+ showDeleteAccount = true,
33
+ showSignOut = true,
34
+ t,
35
+ } = config;
36
+
37
+ return (
38
+ <View
39
+ style={[
40
+ styles.container,
41
+ { backgroundColor: tokens.colors.background },
42
+ ]}
43
+ >
44
+ <ScrollView
45
+ contentContainerStyle={[
46
+ styles.content,
47
+ { paddingBottom: insets.bottom + 24 },
48
+ ]}
49
+ showsVerticalScrollIndicator={false}
50
+ >
51
+ <SettingsSection title={t("settings.account.title")}>
52
+ {showSignOut && onSignOut && (
53
+ <SettingsItem
54
+ label={t("auth.signOut")}
55
+ icon="log-out-outline"
56
+ onPress={onSignOut}
57
+ variant="default"
58
+ />
59
+ )}
60
+
61
+ {showDeleteAccount && onDeleteAccount && (
62
+ <SettingsItem
63
+ label={t("account.deleteAccount")}
64
+ icon="trash-outline"
65
+ onPress={onDeleteAccount}
66
+ variant="destructive"
67
+ />
68
+ )}
69
+ </SettingsSection>
70
+ </ScrollView>
71
+ </View>
72
+ );
73
+ };
74
+
75
+ const styles = StyleSheet.create({
76
+ container: {
77
+ flex: 1,
78
+ },
79
+ content: {
80
+ paddingTop: 16,
81
+ },
82
+ });
@@ -241,3 +241,23 @@ export interface SubscriptionConfig {
241
241
  /** Whether user is premium (to show active status) */
242
242
  isPremium?: boolean;
243
243
  }
244
+
245
+ /**
246
+ * Wallet Settings Configuration
247
+ */
248
+ export interface WalletConfig {
249
+ /** Show wallet section */
250
+ enabled?: FeatureVisibility;
251
+ /** Custom title for the wallet section */
252
+ title?: string;
253
+ /** Custom label for the wallet item */
254
+ description?: string;
255
+ /** Custom icon name (Ionicons) */
256
+ icon?: string;
257
+ /** Custom section title for grouping */
258
+ sectionTitle?: string;
259
+ /** Navigation route for wallet screen */
260
+ route?: string;
261
+ /** Current balance to display */
262
+ balance?: number;
263
+ }
@@ -17,6 +17,7 @@ import type {
17
17
  FAQConfig,
18
18
  CloudSyncConfig,
19
19
  SubscriptionConfig,
20
+ WalletConfig,
20
21
  } from "./FeatureConfig";
21
22
 
22
23
  /**