@umituz/react-native-settings 4.20.16 → 4.20.17

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.16",
3
+ "version": "4.20.17",
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",
@@ -15,7 +15,8 @@ export interface ThemeOptionConfig {
15
15
  title: string;
16
16
  subtitle?: string;
17
17
  description?: string;
18
- features: string[];
18
+ features?: string[];
19
+ featuresTitle?: string;
19
20
  }
20
21
 
21
22
  export interface ThemeModeSectionProps {
@@ -58,9 +59,10 @@ export const ThemeModeSection: React.FC<ThemeModeSectionProps> = ({
58
59
  key={theme.mode}
59
60
  mode={theme.mode}
60
61
  title={theme.title}
61
- subtitle={theme.subtitle || ""}
62
- description={theme.description || ""}
62
+ subtitle={theme.subtitle}
63
+ description={theme.description}
63
64
  features={theme.features}
65
+ featuresTitle={theme.featuresTitle}
64
66
  isSelected={themeMode === theme.mode}
65
67
  onSelect={() => handleThemeSelect(theme.mode)}
66
68
  />
@@ -64,41 +64,23 @@ export const AppearanceScreen: React.FC<AppearanceScreenProps> = ({
64
64
  const themeSectionMemo = useMemo(() => {
65
65
  if (!showThemeSection) return null;
66
66
 
67
- const defaultLightMode: ThemeOptionConfig = {
68
- mode: "light",
69
- title: "Light Mode",
70
- subtitle: "Bright and clean",
71
- description: "Perfect for daytime use with vibrant colors.",
72
- features: ["Bright colors", "High contrast", "Easy on eyes during day"],
73
- };
74
-
75
- const defaultDarkMode: ThemeOptionConfig = {
76
- mode: "dark",
77
- title: "Dark Mode",
78
- subtitle: "Easy on eyes",
79
- description: "Ideal for low-light environments.",
80
- features: ["Reduced eye strain", "Better battery life", "Comfortable at night"],
81
- };
82
-
83
67
  const themes: ThemeOptionConfig[] = [
84
- texts?.lightMode
85
- ? {
86
- mode: "light",
87
- title: texts.lightMode.title,
88
- subtitle: texts.lightMode.subtitle,
89
- description: texts.lightMode.description,
90
- features: texts.lightMode.features,
91
- }
92
- : defaultLightMode,
93
- texts?.darkMode
94
- ? {
95
- mode: "dark",
96
- title: texts.darkMode.title,
97
- subtitle: texts.darkMode.subtitle,
98
- description: texts.darkMode.description,
99
- features: texts.darkMode.features,
100
- }
101
- : defaultDarkMode,
68
+ {
69
+ mode: "light",
70
+ title: texts?.lightMode?.title ?? "settings.themeMode.light.title",
71
+ subtitle: texts?.lightMode?.subtitle,
72
+ description: texts?.lightMode?.description,
73
+ features: texts?.lightMode?.features,
74
+ featuresTitle: texts?.featuresSectionTitle,
75
+ },
76
+ {
77
+ mode: "dark",
78
+ title: texts?.darkMode?.title ?? "settings.themeMode.dark.title",
79
+ subtitle: texts?.darkMode?.subtitle,
80
+ description: texts?.darkMode?.description,
81
+ features: texts?.darkMode?.features,
82
+ featuresTitle: texts?.featuresSectionTitle,
83
+ },
102
84
  ];
103
85
 
104
86
  return (
@@ -106,7 +88,7 @@ export const AppearanceScreen: React.FC<AppearanceScreenProps> = ({
106
88
  tokens={tokens}
107
89
  themeMode={themeMode}
108
90
  onThemeSelect={handleThemeSelect}
109
- title={texts?.themeSectionTitle ?? "Theme Mode"}
91
+ title={texts?.themeSectionTitle}
110
92
  description={texts?.themeSectionDescription}
111
93
  themes={themes}
112
94
  />
@@ -120,6 +102,7 @@ export const AppearanceScreen: React.FC<AppearanceScreenProps> = ({
120
102
  texts?.themeSectionDescription,
121
103
  texts?.lightMode,
122
104
  texts?.darkMode,
105
+ texts?.featuresSectionTitle,
123
106
  ]);
124
107
 
125
108
  const colorsSectionMemo = useMemo(() => {
@@ -44,6 +44,7 @@ export interface AppearanceTexts {
44
44
  subtitle?: string;
45
45
  themeSectionTitle?: string;
46
46
  themeSectionDescription?: string;
47
+ featuresSectionTitle?: string;
47
48
  colorsSectionTitle?: string;
48
49
  colorsSectionDescription?: string;
49
50
  previewSectionTitle?: string;
@@ -15,6 +15,7 @@ export interface FeedbackConfig {
15
15
  description?: string;
16
16
  initialType?: FeedbackType;
17
17
  onSubmit?: (data: { type: any; rating: number; description: string; title: string }) => Promise<void>;
18
+ onPress?: () => void;
18
19
  }
19
20
 
20
21
  export interface RatingConfig {