@umituz/react-native-settings 4.23.9 → 4.23.10

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.23.9",
3
+ "version": "4.23.10",
4
4
  "description": "Complete settings hub for React Native apps - consolidated package with settings, about, legal, appearance, feedback, FAQs, rating, and gamification",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -71,4 +71,6 @@ export interface AboutConfig {
71
71
  title?: string;
72
72
  /** Section description */
73
73
  description?: string;
74
+ /** Custom onPress handler (overrides navigation) */
75
+ onPress?: () => void;
74
76
  }
@@ -30,6 +30,8 @@ export interface AppearanceSectionConfig {
30
30
  route?: string;
31
31
  /** Default navigation route name */
32
32
  defaultRoute?: string;
33
+ /** Custom onPress handler (overrides navigation) */
34
+ onPress?: () => void;
33
35
  }
34
36
 
35
37
  export interface ThemeModeTextConfig {
@@ -27,6 +27,7 @@ export const EnvViewerSetting: React.FC<EnvViewerSettingProps> = ({
27
27
  title = "Environment Variables",
28
28
  description = "View app configuration",
29
29
  screenName,
30
+ onPress,
30
31
  }) => {
31
32
  const tokens = useAppDesignTokens();
32
33
  const navigation = useAppNavigation();
@@ -35,7 +36,7 @@ export const EnvViewerSetting: React.FC<EnvViewerSettingProps> = ({
35
36
  if (onPress) {
36
37
  onPress();
37
38
  } else {
38
- navigation.navigate(screenName as any, { config } as any);
39
+ navigation.navigate(screenName as never, { config } as never);
39
40
  }
40
41
  };
41
42
 
@@ -23,4 +23,6 @@ export interface LegalConfig {
23
23
  termsUrl?: string;
24
24
  /** EULA URL */
25
25
  eulaUrl?: string;
26
+ /** Custom onPress handler (overrides navigation) */
27
+ onPress?: () => void;
26
28
  }
@@ -144,17 +144,16 @@ export const createRatingConfig = (
144
144
 
145
145
  /**
146
146
  * Create FAQ configuration
147
+ * Navigation is handled internally by the package - no callback needed
147
148
  */
148
149
  export const createFAQConfig = (
149
150
  t: TranslationFunction,
150
- onPress: () => void,
151
151
  ): FAQConfig => ({
152
152
  enabled: true,
153
153
  title: t("settings.faqs.title"),
154
154
  description: t("settings.faqs.description"),
155
155
  icon: "help-circle-outline",
156
156
  sectionTitle: t("settings.sections.support").toUpperCase(),
157
- onPress,
158
157
  });
159
158
 
160
159
  /**