@umituz/react-native-settings 1.8.2 → 1.10.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
|
@@ -49,6 +49,7 @@ export const SettingItem: React.FC<SettingItemProps> = ({
|
|
|
49
49
|
}) => {
|
|
50
50
|
const tokens = useAppDesignTokens();
|
|
51
51
|
const colors = tokens.colors;
|
|
52
|
+
const spacing = tokens.spacing;
|
|
52
53
|
|
|
53
54
|
return (
|
|
54
55
|
<>
|
|
@@ -166,6 +167,6 @@ const styles = StyleSheet.create({
|
|
|
166
167
|
},
|
|
167
168
|
divider: {
|
|
168
169
|
height: 1,
|
|
169
|
-
marginLeft:
|
|
170
|
+
marginLeft: 80,
|
|
170
171
|
},
|
|
171
172
|
});
|
|
@@ -20,6 +20,7 @@ export const SettingsSection: React.FC<SettingsSectionProps> = ({
|
|
|
20
20
|
}) => {
|
|
21
21
|
const tokens = useAppDesignTokens();
|
|
22
22
|
const colors = tokens.colors;
|
|
23
|
+
const spacing = tokens.spacing;
|
|
23
24
|
|
|
24
25
|
return (
|
|
25
26
|
<View style={styles.container}>
|
|
@@ -40,18 +41,20 @@ export const SettingsSection: React.FC<SettingsSectionProps> = ({
|
|
|
40
41
|
|
|
41
42
|
const styles = StyleSheet.create({
|
|
42
43
|
container: {
|
|
43
|
-
|
|
44
|
+
marginTop: 0,
|
|
45
|
+
marginBottom: 32,
|
|
44
46
|
},
|
|
45
47
|
title: {
|
|
46
|
-
fontSize:
|
|
48
|
+
fontSize: 11,
|
|
47
49
|
fontWeight: "700",
|
|
48
50
|
textTransform: "uppercase",
|
|
49
|
-
letterSpacing: 1,
|
|
51
|
+
letterSpacing: 1.2,
|
|
50
52
|
paddingHorizontal: 16,
|
|
51
|
-
paddingBottom:
|
|
53
|
+
paddingBottom: 12,
|
|
54
|
+
marginBottom: 0,
|
|
52
55
|
},
|
|
53
56
|
content: {
|
|
54
|
-
borderRadius:
|
|
57
|
+
borderRadius: 16,
|
|
55
58
|
marginHorizontal: 16,
|
|
56
59
|
overflow: "hidden",
|
|
57
60
|
},
|
|
@@ -36,6 +36,7 @@ export const UserProfileHeader: React.FC<UserProfileHeaderProps> = ({
|
|
|
36
36
|
const tokens = useAppDesignTokens();
|
|
37
37
|
const navigation = useNavigation();
|
|
38
38
|
const colors = tokens.colors;
|
|
39
|
+
const spacing = tokens.spacing;
|
|
39
40
|
|
|
40
41
|
const finalDisplayName = displayName || (isGuest ? "Guest" : "User");
|
|
41
42
|
const finalUserId = userId || "Unknown";
|
|
@@ -94,11 +95,12 @@ const styles = StyleSheet.create({
|
|
|
94
95
|
flexDirection: "row",
|
|
95
96
|
alignItems: "center",
|
|
96
97
|
justifyContent: "space-between",
|
|
97
|
-
paddingHorizontal:
|
|
98
|
-
paddingVertical:
|
|
98
|
+
paddingHorizontal: 20,
|
|
99
|
+
paddingVertical: 20,
|
|
99
100
|
marginHorizontal: 16,
|
|
100
101
|
marginTop: 0,
|
|
101
|
-
|
|
102
|
+
marginBottom: 0,
|
|
103
|
+
borderRadius: 16,
|
|
102
104
|
borderWidth: 1,
|
|
103
105
|
},
|
|
104
106
|
content: {
|
|
@@ -107,13 +109,13 @@ const styles = StyleSheet.create({
|
|
|
107
109
|
flex: 1,
|
|
108
110
|
},
|
|
109
111
|
avatar: {
|
|
110
|
-
width:
|
|
111
|
-
height:
|
|
112
|
-
borderRadius:
|
|
113
|
-
borderWidth: 2,
|
|
112
|
+
width: 56,
|
|
113
|
+
height: 56,
|
|
114
|
+
borderRadius: 28,
|
|
115
|
+
borderWidth: 2.5,
|
|
114
116
|
},
|
|
115
117
|
textContainer: {
|
|
116
|
-
marginLeft:
|
|
118
|
+
marginLeft: 16,
|
|
117
119
|
flex: 1,
|
|
118
120
|
},
|
|
119
121
|
name: {
|
|
@@ -59,6 +59,7 @@ export const SettingsScreen: React.FC<SettingsScreenProps> = ({
|
|
|
59
59
|
|
|
60
60
|
const isDark = themeMode === "dark";
|
|
61
61
|
const colors = tokens.colors;
|
|
62
|
+
const spacing = tokens.spacing;
|
|
62
63
|
|
|
63
64
|
const normalizedConfig = normalizeSettingsConfig(config);
|
|
64
65
|
const features = useFeatureDetection(normalizedConfig, navigation);
|
|
@@ -79,21 +80,24 @@ export const SettingsScreen: React.FC<SettingsScreenProps> = ({
|
|
|
79
80
|
contentContainerStyle={[
|
|
80
81
|
styles.scrollContent,
|
|
81
82
|
{
|
|
82
|
-
paddingTop: insets.top +
|
|
83
|
-
paddingBottom:
|
|
83
|
+
paddingTop: insets.top + spacing.md,
|
|
84
|
+
paddingBottom: spacing.xxxl + spacing.xl,
|
|
85
|
+
paddingHorizontal: 0,
|
|
84
86
|
},
|
|
85
87
|
]}
|
|
86
88
|
showsVerticalScrollIndicator={false}
|
|
87
89
|
>
|
|
88
90
|
{showUserProfile && (
|
|
89
|
-
<
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
91
|
+
<View style={styles.profileContainer}>
|
|
92
|
+
<UserProfileHeader
|
|
93
|
+
displayName={userProfile?.displayName}
|
|
94
|
+
userId={userProfile?.userId}
|
|
95
|
+
isGuest={userProfile?.isGuest}
|
|
96
|
+
avatarUrl={userProfile?.avatarUrl}
|
|
97
|
+
accountSettingsRoute={userProfile?.accountSettingsRoute}
|
|
98
|
+
onPress={userProfile?.onPress}
|
|
99
|
+
/>
|
|
100
|
+
</View>
|
|
97
101
|
)}
|
|
98
102
|
|
|
99
103
|
{features.appearance && (
|
|
@@ -154,6 +158,10 @@ const styles = StyleSheet.create({
|
|
|
154
158
|
scrollContent: {
|
|
155
159
|
flexGrow: 1,
|
|
156
160
|
},
|
|
161
|
+
profileContainer: {
|
|
162
|
+
marginBottom: 32,
|
|
163
|
+
paddingHorizontal: 0,
|
|
164
|
+
},
|
|
157
165
|
emptyContainer: {
|
|
158
166
|
paddingVertical: 24,
|
|
159
167
|
},
|