@umituz/react-native-settings 4.23.48 → 4.23.50
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.
|
|
3
|
+
"version": "4.23.50",
|
|
4
4
|
"description": "Complete settings hub for React Native apps - consolidated package with settings, localization, about, legal, appearance, feedback, FAQs, rating, and gamification",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@react-navigation/native": ">=6.0.0",
|
|
49
49
|
"@react-navigation/stack": ">=6.0.0",
|
|
50
50
|
"@tanstack/react-query": ">=5.0.0",
|
|
51
|
-
"@umituz/react-native-design-system": "
|
|
51
|
+
"@umituz/react-native-design-system": "*",
|
|
52
52
|
"expo-device": ">=6.0.0",
|
|
53
53
|
"expo-haptics": ">=15.0.0",
|
|
54
54
|
"expo-localization": ">=16.0.0",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
78
78
|
"@typescript-eslint/parser": "^7.18.0",
|
|
79
79
|
"@umituz/react-native-auth": "^3.6.49",
|
|
80
|
-
"@umituz/react-native-design-system": "^4.23.
|
|
80
|
+
"@umituz/react-native-design-system": "^4.23.49",
|
|
81
81
|
"@umituz/react-native-firebase": "^1.13.102",
|
|
82
82
|
"@umituz/react-native-sentry": "*",
|
|
83
83
|
"eslint": "^8.57.0",
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { useTheme, type ThemeMode, type CustomThemeColors } from "@umituz/react-native-design-system";
|
|
2
2
|
|
|
3
3
|
export const useAppearance = () => {
|
|
4
|
-
const { themeMode, customColors, isInitialized, setThemeMode, setCustomColors } = useTheme();
|
|
4
|
+
const { themeMode, customColors, defaultColors, isInitialized, setThemeMode, setCustomColors, resetToDefaults } = useTheme();
|
|
5
5
|
|
|
6
6
|
return {
|
|
7
7
|
themeMode,
|
|
8
8
|
customColors,
|
|
9
|
+
defaultColors,
|
|
9
10
|
isLoading: !isInitialized,
|
|
10
11
|
setThemeMode: (mode: ThemeMode) => {
|
|
11
12
|
void setThemeMode(mode);
|
|
@@ -14,8 +15,7 @@ export const useAppearance = () => {
|
|
|
14
15
|
void setCustomColors(colors);
|
|
15
16
|
},
|
|
16
17
|
reset: () => {
|
|
17
|
-
void
|
|
18
|
-
void setCustomColors(undefined);
|
|
18
|
+
void resetToDefaults();
|
|
19
19
|
},
|
|
20
20
|
};
|
|
21
21
|
};
|