@umituz/react-native-settings 4.16.19 → 4.16.21

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.16.19",
3
+ "version": "4.16.21",
4
4
  "description": "Settings management for React Native apps - user preferences, theme, language, notifications",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -4,7 +4,6 @@
4
4
  */
5
5
 
6
6
  import React, { useCallback } from "react";
7
- import { Feather } from "@expo/vector-icons";
8
7
  import { SettingItem } from "./SettingItem";
9
8
  import type { SettingItemProps } from "./SettingItem";
10
9
 
@@ -46,7 +45,7 @@ export const CloudSyncSetting: React.FC<CloudSyncSettingProps> = ({
46
45
 
47
46
  return (
48
47
  <SettingItem
49
- icon={(props) => <Feather name={"cloud" as any} {...props} />}
48
+ icon="cloud-outline"
50
49
  title={title || "cloud_sync"}
51
50
  value={displayDescription}
52
51
  onPress={onPress}
@@ -9,17 +9,11 @@
9
9
 
10
10
  import React from "react";
11
11
  import { Alert } from "react-native";
12
- import { Feather } from "@expo/vector-icons";
13
12
  import { useAppDesignTokens } from "@umituz/react-native-design-system";
14
13
  import { storageRepository } from "@umituz/react-native-storage";
15
14
  import { SettingsSection } from "./SettingsSection";
16
15
  import { SettingItem } from "./SettingItem";
17
16
 
18
- // Icon wrapper for SettingItem compatibility
19
- const TrashIcon: React.FC<{ size?: number; color?: string }> = ({ size = 24, color }) => (
20
- <Feather name="trash-2" size={size} color={color} />
21
- );
22
-
23
17
  // Default texts (English only - DEV feature)
24
18
  const DEFAULT_TEXTS = {
25
19
  sectionTitle: "Developer",
@@ -107,7 +101,7 @@ export const DevSettingsSection: React.FC<DevSettingsProps> = ({
107
101
  <SettingsSection title={t.sectionTitle}>
108
102
  {customDevComponents.map((component) => component)}
109
103
  <SettingItem
110
- icon={TrashIcon}
104
+ icon="trash-outline"
111
105
  title={t.clearTitle}
112
106
  value={t.clearDescription}
113
107
  onPress={handleClearData}
@@ -6,12 +6,11 @@
6
6
 
7
7
  import React from "react";
8
8
  import { View, Text, Pressable, StyleSheet, Switch } from "react-native";
9
- import { Feather } from "@expo/vector-icons";
10
- import { useAppDesignTokens } from "@umituz/react-native-design-system";
9
+ import { AtomicIcon, useAppDesignTokens } from "@umituz/react-native-design-system";
11
10
 
12
11
  export interface SettingItemProps {
13
- /** Icon component from @expo/vector-icons */
14
- icon: React.ComponentType<{ size?: number; color?: string; name?: string }>;
12
+ /** Icon name (Ionicons) */
13
+ icon: string;
15
14
  /** Main title text */
16
15
  title: string;
17
16
  /** Optional description/value text */
@@ -44,7 +43,7 @@ export interface SettingItemProps {
44
43
  }
45
44
 
46
45
  export const SettingItem: React.FC<SettingItemProps> = ({
47
- icon: Icon,
46
+ icon,
48
47
  title,
49
48
  value,
50
49
  onPress,
@@ -61,7 +60,6 @@ export const SettingItem: React.FC<SettingItemProps> = ({
61
60
  }) => {
62
61
  const tokens = useAppDesignTokens();
63
62
  const colors = tokens.colors;
64
- const spacing = tokens.spacing;
65
63
 
66
64
  return (
67
65
  <>
@@ -89,7 +87,11 @@ export const SettingItem: React.FC<SettingItemProps> = ({
89
87
  },
90
88
  ]}
91
89
  >
92
- <Icon size={24} color={iconColor || colors.primary} />
90
+ <AtomicIcon
91
+ name={icon}
92
+ customSize={24}
93
+ customColor={iconColor || colors.primary}
94
+ />
93
95
  </View>
94
96
  <View style={styles.textContainer}>
95
97
  <Text
@@ -130,7 +132,11 @@ export const SettingItem: React.FC<SettingItemProps> = ({
130
132
  ios_backgroundColor={`${colors.textSecondary}30`}
131
133
  />
132
134
  ) : (
133
- <Feather name="chevron-right" size={20} color={colors.textSecondary} />
135
+ <AtomicIcon
136
+ name="chevron-forward-outline"
137
+ customSize={20}
138
+ customColor={colors.textSecondary}
139
+ />
134
140
  )}
135
141
  </View>
136
142
  </Pressable>
@@ -5,7 +5,6 @@
5
5
  */
6
6
 
7
7
  import React from "react";
8
- import { Feather } from "@expo/vector-icons";
9
8
  import { SettingItem } from "./SettingItem";
10
9
 
11
10
  export interface StorageClearSettingProps {
@@ -37,7 +36,7 @@ export const StorageClearSetting: React.FC<StorageClearSettingProps> = ({
37
36
 
38
37
  return (
39
38
  <SettingItem
40
- icon={(props) => <Feather name={"trash-2" as any} {...props} />}
39
+ icon="trash-outline"
41
40
  title={defaultTitle}
42
41
  value={defaultDescription}
43
42
  onPress={onPress}