@umituz/react-native-settings 4.18.0 → 4.19.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-settings",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.19.0",
|
|
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",
|
|
@@ -10,7 +10,7 @@ import { createStackNavigator } from "@react-navigation/stack";
|
|
|
10
10
|
import { useResponsiveDesignTokens } from "@umituz/react-native-design-system";
|
|
11
11
|
import { SettingsScreen } from "../screens/SettingsScreen";
|
|
12
12
|
import { AppearanceScreen } from "../screens/AppearanceScreen";
|
|
13
|
-
import type { SettingsConfig } from "../screens/types";
|
|
13
|
+
import type { SettingsConfig, CustomSettingsSection } from "../screens/types";
|
|
14
14
|
import type { DevSettingsProps } from "../components/DevSettingsSection";
|
|
15
15
|
|
|
16
16
|
// Default param list - can be extended by apps
|
|
@@ -64,6 +64,12 @@ export interface SettingsStackNavigatorProps {
|
|
|
64
64
|
* Dev settings (only shown in __DEV__ mode)
|
|
65
65
|
*/
|
|
66
66
|
devSettings?: DevSettingsProps;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Custom sections to render in settings list
|
|
70
|
+
* Use this to add app-specific items like subscription
|
|
71
|
+
*/
|
|
72
|
+
customSections?: CustomSettingsSection[];
|
|
67
73
|
}
|
|
68
74
|
|
|
69
75
|
const Stack = createStackNavigator<SettingsStackParamList>();
|
|
@@ -75,6 +81,7 @@ export const SettingsStackNavigator: React.FC<SettingsStackNavigatorProps> = ({
|
|
|
75
81
|
userProfile,
|
|
76
82
|
additionalScreens = [],
|
|
77
83
|
devSettings,
|
|
84
|
+
customSections = [],
|
|
78
85
|
}) => {
|
|
79
86
|
const tokens = useResponsiveDesignTokens();
|
|
80
87
|
|
|
@@ -101,11 +108,12 @@ export const SettingsStackNavigator: React.FC<SettingsStackNavigatorProps> = ({
|
|
|
101
108
|
showUserProfile={showUserProfile}
|
|
102
109
|
userProfile={userProfile}
|
|
103
110
|
devSettings={devSettings}
|
|
111
|
+
customSections={customSections}
|
|
104
112
|
/>
|
|
105
113
|
);
|
|
106
114
|
Wrapper.displayName = "SettingsScreenWrapper";
|
|
107
115
|
return Wrapper;
|
|
108
|
-
}, [config, appVersion, showUserProfile, userProfile, devSettings]);
|
|
116
|
+
}, [config, appVersion, showUserProfile, userProfile, devSettings, customSections]);
|
|
109
117
|
|
|
110
118
|
return (
|
|
111
119
|
<Stack.Navigator screenOptions={screenOptions}>
|