@umituz/react-native-settings 1.10.2 → 1.10.3
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
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import React from "react";
|
|
8
|
-
import { View,
|
|
8
|
+
import { View, TouchableOpacity, StyleSheet, Image } from "react-native";
|
|
9
9
|
import { ChevronRight } from "lucide-react-native";
|
|
10
10
|
import { useAppDesignTokens } from "@umituz/react-native-design-system-theme";
|
|
11
|
+
import { AtomicText } from "@umituz/react-native-design-system-atoms";
|
|
11
12
|
import { useNavigation } from "@react-navigation/native";
|
|
12
13
|
|
|
13
14
|
export interface UserProfileHeaderProps {
|
|
@@ -58,34 +59,42 @@ export const UserProfileHeader: React.FC<UserProfileHeaderProps> = ({
|
|
|
58
59
|
style={[
|
|
59
60
|
styles.container,
|
|
60
61
|
{
|
|
61
|
-
backgroundColor: colors.
|
|
62
|
-
|
|
62
|
+
backgroundColor: colors.surface,
|
|
63
|
+
paddingHorizontal: spacing.md,
|
|
64
|
+
paddingVertical: spacing.md,
|
|
65
|
+
marginHorizontal: spacing.md,
|
|
63
66
|
},
|
|
64
67
|
]}
|
|
65
68
|
onPress={handlePress}
|
|
66
69
|
activeOpacity={0.7}
|
|
67
70
|
>
|
|
68
71
|
<View style={styles.content}>
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
<View style={[styles.avatarContainer, { borderColor: `${colors.primary}30` }]}>
|
|
73
|
+
<Image
|
|
74
|
+
source={{ uri: finalAvatarUrl }}
|
|
75
|
+
style={styles.avatar}
|
|
76
|
+
/>
|
|
77
|
+
</View>
|
|
78
|
+
<View style={[styles.textContainer, { marginLeft: spacing.md }]}>
|
|
79
|
+
<AtomicText
|
|
80
|
+
type="headlineSmall"
|
|
81
|
+
style={[styles.name, { color: colors.textPrimary, marginBottom: spacing.xs }]}
|
|
76
82
|
numberOfLines={1}
|
|
77
83
|
>
|
|
78
84
|
{finalDisplayName}
|
|
79
|
-
</
|
|
80
|
-
<
|
|
85
|
+
</AtomicText>
|
|
86
|
+
<AtomicText
|
|
87
|
+
type="bodySmall"
|
|
81
88
|
style={[styles.id, { color: colors.textSecondary }]}
|
|
82
89
|
numberOfLines={1}
|
|
83
90
|
>
|
|
84
|
-
ID: {finalUserId.substring(0,
|
|
85
|
-
</
|
|
91
|
+
ID: {finalUserId.substring(0, 10)}...
|
|
92
|
+
</AtomicText>
|
|
86
93
|
</View>
|
|
87
94
|
</View>
|
|
88
|
-
<
|
|
95
|
+
<View style={[styles.chevronContainer, { marginLeft: spacing.sm }]}>
|
|
96
|
+
<ChevronRight size={22} color={colors.textSecondary} strokeWidth={2.5} />
|
|
97
|
+
</View>
|
|
89
98
|
</TouchableOpacity>
|
|
90
99
|
);
|
|
91
100
|
};
|
|
@@ -95,37 +104,42 @@ const styles = StyleSheet.create({
|
|
|
95
104
|
flexDirection: "row",
|
|
96
105
|
alignItems: "center",
|
|
97
106
|
justifyContent: "space-between",
|
|
98
|
-
paddingHorizontal: 20,
|
|
99
|
-
paddingVertical: 20,
|
|
100
|
-
marginHorizontal: 16,
|
|
101
107
|
marginTop: 0,
|
|
102
108
|
marginBottom: 0,
|
|
103
|
-
borderRadius:
|
|
104
|
-
|
|
109
|
+
borderRadius: 20,
|
|
110
|
+
minHeight: 80,
|
|
105
111
|
},
|
|
106
112
|
content: {
|
|
107
113
|
flexDirection: "row",
|
|
108
114
|
alignItems: "center",
|
|
109
115
|
flex: 1,
|
|
110
116
|
},
|
|
117
|
+
avatarContainer: {
|
|
118
|
+
width: 64,
|
|
119
|
+
height: 64,
|
|
120
|
+
borderRadius: 32,
|
|
121
|
+
borderWidth: 2,
|
|
122
|
+
overflow: "hidden",
|
|
123
|
+
backgroundColor: "transparent",
|
|
124
|
+
},
|
|
111
125
|
avatar: {
|
|
112
|
-
width:
|
|
113
|
-
height:
|
|
114
|
-
borderRadius: 28,
|
|
115
|
-
borderWidth: 2.5,
|
|
126
|
+
width: "100%",
|
|
127
|
+
height: "100%",
|
|
116
128
|
},
|
|
117
129
|
textContainer: {
|
|
118
|
-
marginLeft: 16,
|
|
119
130
|
flex: 1,
|
|
120
131
|
},
|
|
121
132
|
name: {
|
|
122
|
-
|
|
123
|
-
fontWeight: "600",
|
|
124
|
-
marginBottom: 4,
|
|
133
|
+
fontWeight: "700",
|
|
125
134
|
},
|
|
126
135
|
id: {
|
|
127
|
-
|
|
128
|
-
|
|
136
|
+
fontWeight: "500",
|
|
137
|
+
opacity: 0.7,
|
|
138
|
+
},
|
|
139
|
+
chevronContainer: {
|
|
140
|
+
justifyContent: "center",
|
|
141
|
+
alignItems: "center",
|
|
129
142
|
},
|
|
130
143
|
});
|
|
131
144
|
|
|
145
|
+
|