@umituz/react-native-settings 4.20.35 → 4.20.37
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.
|
|
3
|
+
"version": "4.20.37",
|
|
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",
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React, { useMemo, useCallback } from "react";
|
|
9
|
-
import { ScreenLayout } from "@umituz/react-native-design-system";
|
|
10
|
-
import {
|
|
9
|
+
import { ScreenLayout, useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
10
|
+
import { useLocalization } from "@umituz/react-native-localization";
|
|
11
11
|
import { useAppearance, useAppearanceActions } from "../../hooks";
|
|
12
12
|
import {
|
|
13
13
|
AppearanceHeader,
|
|
@@ -34,6 +34,7 @@ export const AppearanceScreen: React.FC<AppearanceScreenProps> = ({
|
|
|
34
34
|
showPreviewSection = true,
|
|
35
35
|
}) => {
|
|
36
36
|
const tokens = useAppDesignTokens();
|
|
37
|
+
const { t } = useLocalization();
|
|
37
38
|
const { themeMode } = useAppearance();
|
|
38
39
|
const {
|
|
39
40
|
localCustomColors,
|
|
@@ -67,17 +68,17 @@ export const AppearanceScreen: React.FC<AppearanceScreenProps> = ({
|
|
|
67
68
|
const themes: ThemeOptionConfig[] = [
|
|
68
69
|
{
|
|
69
70
|
mode: "light",
|
|
70
|
-
title: texts?.lightMode?.title ?? "settings.
|
|
71
|
-
subtitle: texts?.lightMode?.subtitle,
|
|
72
|
-
description: texts?.lightMode?.description,
|
|
71
|
+
title: texts?.lightMode?.title ?? t("settings.appearance.lightMode.title"),
|
|
72
|
+
subtitle: texts?.lightMode?.subtitle ?? t("settings.appearance.lightMode.subtitle"),
|
|
73
|
+
description: texts?.lightMode?.description ?? t("settings.appearance.lightMode.description"),
|
|
73
74
|
features: texts?.lightMode?.features,
|
|
74
75
|
featuresTitle: texts?.featuresSectionTitle,
|
|
75
76
|
},
|
|
76
77
|
{
|
|
77
78
|
mode: "dark",
|
|
78
|
-
title: texts?.darkMode?.title ?? "settings.
|
|
79
|
-
subtitle: texts?.darkMode?.subtitle,
|
|
80
|
-
description: texts?.darkMode?.description,
|
|
79
|
+
title: texts?.darkMode?.title ?? t("settings.appearance.darkMode.title"),
|
|
80
|
+
subtitle: texts?.darkMode?.subtitle ?? t("settings.appearance.darkMode.subtitle"),
|
|
81
|
+
description: texts?.darkMode?.description ?? t("settings.appearance.darkMode.description"),
|
|
81
82
|
features: texts?.darkMode?.features,
|
|
82
83
|
featuresTitle: texts?.featuresSectionTitle,
|
|
83
84
|
},
|
|
@@ -88,8 +89,8 @@ export const AppearanceScreen: React.FC<AppearanceScreenProps> = ({
|
|
|
88
89
|
tokens={tokens}
|
|
89
90
|
themeMode={themeMode}
|
|
90
91
|
onThemeSelect={handleThemeSelect}
|
|
91
|
-
title={texts?.themeSectionTitle}
|
|
92
|
-
description={texts?.themeSectionDescription}
|
|
92
|
+
title={texts?.themeSectionTitle ?? t("settings.appearance.themeSectionTitle")}
|
|
93
|
+
description={texts?.themeSectionDescription ?? t("settings.appearance.themeSectionDescription")}
|
|
93
94
|
themes={themes}
|
|
94
95
|
/>
|
|
95
96
|
);
|
|
@@ -103,6 +104,7 @@ export const AppearanceScreen: React.FC<AppearanceScreenProps> = ({
|
|
|
103
104
|
texts?.lightMode,
|
|
104
105
|
texts?.darkMode,
|
|
105
106
|
texts?.featuresSectionTitle,
|
|
107
|
+
t,
|
|
106
108
|
]);
|
|
107
109
|
|
|
108
110
|
const colorsSectionMemo = useMemo(() => {
|