@umituz/react-native-settings 4.20.20 → 4.20.23

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.20",
3
+ "version": "4.20.23",
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",
@@ -130,7 +130,7 @@ export const FAQScreen: React.FC<FAQScreenProps> = ({
130
130
  }
131
131
 
132
132
  return (
133
- <ScreenLayout edges={['bottom']} scrollable={false} maxWidth={contentMaxWidth}>
133
+ <ScreenLayout edges={['bottom']} scrollable={false}>
134
134
  <View style={[styles.container, customStyles?.container]}>
135
135
  {renderContent()}
136
136
  </View>
package/src/index.ts CHANGED
@@ -130,6 +130,4 @@ export { OnboardingResetSetting } from '@umituz/react-native-onboarding';
130
130
  export type { OnboardingResetSettingProps } from '@umituz/react-native-onboarding';
131
131
 
132
132
  // @ts-ignore - Re-exporting from peer dependency
133
- export { createSentryTestSetting } from '@umituz/react-native-sentry';
134
133
  // @ts-ignore - Re-exporting from peer dependency
135
- export type { SentryTestSettingProps } from '@umituz/react-native-sentry';
@@ -1,5 +1,6 @@
1
1
  import React, { useMemo } from "react";
2
2
  import { SettingsSection } from "../../../components/SettingsSection";
3
+ import { SettingsItemCard } from "../../../components/SettingsItemCard";
3
4
  import type { CustomSettingsSection } from "../../types";
4
5
 
5
6
  interface CustomSettingsListProps {
@@ -24,6 +25,18 @@ export const CustomSettingsList: React.FC<CustomSettingsListProps> = ({
24
25
  title={section.title}
25
26
  >
26
27
  {section.content}
28
+ {!section.content && section.items?.map((item) => (
29
+ <SettingsItemCard
30
+ key={item.id}
31
+ title={item.title}
32
+ description={item.subtitle}
33
+ icon={item.icon}
34
+ onPress={item.onPress}
35
+ rightIcon={item.rightIcon}
36
+ iconBgColor={item.iconBgColor}
37
+ iconColor={item.iconColor}
38
+ />
39
+ ))}
27
40
  </SettingsSection>
28
41
  ))}
29
42
  </>
@@ -12,6 +12,7 @@ export interface ProfileSectionLoaderProps {
12
12
  avatarUrl?: string;
13
13
  accountSettingsRoute?: string;
14
14
  onPress?: () => void;
15
+ benefits?: string[];
15
16
  };
16
17
  }
17
18
 
@@ -39,6 +40,7 @@ export const ProfileSectionLoader: React.FC<ProfileSectionLoaderProps> = ({ user
39
40
  isAnonymous: userProfile.isAnonymous ?? true,
40
41
  avatarUrl: userProfile.avatarUrl,
41
42
  accountSettingsRoute: userProfile.accountSettingsRoute,
43
+ benefits: userProfile.benefits,
42
44
  }}
43
45
  onPress={handlePress}
44
46
  onSignIn={userProfile.onPress}
@@ -1,9 +1,27 @@
1
+ import type { ReactNode } from "react";
2
+ import type { IconName } from "@umituz/react-native-design-system";
3
+
1
4
  /**
2
- * Custom Settings Section Type
3
- * Allows apps to add custom sections to the settings screen
5
+ * Custom Settings Item
4
6
  */
5
-
6
- import type { ReactNode } from "react";
7
+ export interface CustomSettingsItem {
8
+ /** Item unique ID */
9
+ id: string;
10
+ /** Item title */
11
+ title: string;
12
+ /** Optional subtitle or description */
13
+ subtitle?: string;
14
+ /** Icon name (Ionicons) */
15
+ icon: IconName;
16
+ /** Press handler */
17
+ onPress: () => void;
18
+ /** Optional right icon (Ionicons) */
19
+ rightIcon?: IconName;
20
+ /** Optional icon color */
21
+ iconColor?: string;
22
+ /** Optional icon background color */
23
+ iconBgColor?: string;
24
+ }
7
25
 
8
26
  /**
9
27
  * Custom Settings Section
@@ -11,8 +29,10 @@ import type { ReactNode } from "react";
11
29
  export interface CustomSettingsSection {
12
30
  /** Section title */
13
31
  title: string;
14
- /** Section content (React nodes) */
15
- content: ReactNode;
32
+ /** Section content (React nodes) - takes priority over items */
33
+ content?: ReactNode;
34
+ /** List of settings items to render */
35
+ items?: CustomSettingsItem[];
16
36
  /** Section order (lower = higher in list) */
17
37
  order?: number;
18
38
  /** Section ID for identification */