@momo-kits/foundation 1.0.16 → 1.0.18
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/Input/Input.tsx +1 -1
- package/Input/InputMoney.tsx +1 -1
- package/Input/InputSearch.tsx +2 -2
- package/Input/common.tsx +3 -3
- package/Layout/ScreenContainer.tsx +1 -1
- package/Navigation/Components.tsx +2 -2
- package/Popup/PopupNotify.tsx +6 -6
- package/Radio/index.tsx +1 -1
- package/Tag/index.tsx +6 -1
- package/package.json +1 -1
package/Input/Input.tsx
CHANGED
package/Input/InputMoney.tsx
CHANGED
package/Input/InputSearch.tsx
CHANGED
|
@@ -103,7 +103,7 @@ const InputSearch: FC<InputSearchProps> = ({
|
|
|
103
103
|
/>
|
|
104
104
|
</TouchableOpacity>
|
|
105
105
|
)}
|
|
106
|
-
{icon
|
|
106
|
+
{!!icon && (
|
|
107
107
|
<View style={{flexDirection: 'row'}}>
|
|
108
108
|
<View
|
|
109
109
|
style={[
|
|
@@ -115,7 +115,7 @@ const InputSearch: FC<InputSearchProps> = ({
|
|
|
115
115
|
/>
|
|
116
116
|
<Icon
|
|
117
117
|
color={iconTintColor}
|
|
118
|
-
source={icon
|
|
118
|
+
source={icon}
|
|
119
119
|
style={styles.iconSearchInput}
|
|
120
120
|
/>
|
|
121
121
|
</View>
|
package/Input/common.tsx
CHANGED
|
@@ -30,7 +30,7 @@ export const getBorderColor = (
|
|
|
30
30
|
borderColor = theme.colors.primary;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
if (
|
|
33
|
+
if (errorMessage) {
|
|
34
34
|
borderColor = theme.colors.error.primary;
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -103,10 +103,10 @@ export const FloatingView: FC<FloatingViewProps> = ({
|
|
|
103
103
|
</Text>
|
|
104
104
|
)}
|
|
105
105
|
</Text>
|
|
106
|
-
{floatingIcon
|
|
106
|
+
{!!floatingIcon && (
|
|
107
107
|
<Icon
|
|
108
108
|
color={floatingIconTintColor}
|
|
109
|
-
source={floatingIcon
|
|
109
|
+
source={floatingIcon}
|
|
110
110
|
size={16}
|
|
111
111
|
style={styles.floatingIcon}
|
|
112
112
|
/>
|
|
@@ -139,7 +139,7 @@ const HeaderBackground: React.FC<HeaderBackgroundProps> = ({
|
|
|
139
139
|
<StatusBar
|
|
140
140
|
barStyle={headerImage || theme.dark ? 'light-content' : 'dark-content'}
|
|
141
141
|
/>
|
|
142
|
-
{headerImage
|
|
142
|
+
{!!headerImage && (
|
|
143
143
|
<Image style={styles.headerBackground} source={{uri: headerImage}} />
|
|
144
144
|
)}
|
|
145
145
|
</Animated.View>
|
|
@@ -160,7 +160,7 @@ const HeaderCustom: React.FC<TitleCustomProps> = ({
|
|
|
160
160
|
<View style={Styles.row}>
|
|
161
161
|
<View>
|
|
162
162
|
<Image source={{uri: image}} style={avatarStyle} />
|
|
163
|
-
{dotColor
|
|
163
|
+
{!!dotColor && (
|
|
164
164
|
<View style={[styles.dotAvatar, {backgroundColor: dotColor}]} />
|
|
165
165
|
)}
|
|
166
166
|
</View>
|
package/Popup/PopupNotify.tsx
CHANGED
|
@@ -36,11 +36,11 @@ const PopupNotify: React.FC<PopupNotifyProps> = ({
|
|
|
36
36
|
const renderRow = () => {
|
|
37
37
|
return (
|
|
38
38
|
<View style={Styles.row}>
|
|
39
|
-
{secondary?.title
|
|
39
|
+
{!!secondary?.title && (
|
|
40
40
|
<>
|
|
41
41
|
<View style={Styles.flex}>
|
|
42
42
|
<Button
|
|
43
|
-
title={secondary?.title
|
|
43
|
+
title={secondary?.title}
|
|
44
44
|
type="text"
|
|
45
45
|
size="medium"
|
|
46
46
|
onPress={() => {
|
|
@@ -73,11 +73,11 @@ const PopupNotify: React.FC<PopupNotifyProps> = ({
|
|
|
73
73
|
onAction(primary.onPress);
|
|
74
74
|
}}
|
|
75
75
|
/>
|
|
76
|
-
{secondary?.title
|
|
76
|
+
{!!secondary?.title && (
|
|
77
77
|
<>
|
|
78
78
|
<View style={styles.buttonSpace} />
|
|
79
79
|
<Button
|
|
80
|
-
title={secondary?.title
|
|
80
|
+
title={secondary?.title}
|
|
81
81
|
type="text"
|
|
82
82
|
size="medium"
|
|
83
83
|
onPress={() => {
|
|
@@ -137,7 +137,7 @@ const PopupNotify: React.FC<PopupNotifyProps> = ({
|
|
|
137
137
|
styles.container,
|
|
138
138
|
{backgroundColor: theme.colors.background.surface},
|
|
139
139
|
]}>
|
|
140
|
-
{image && <Image source={{uri: image}} style={styles.image} />}
|
|
140
|
+
{!!image && <Image source={{uri: image}} style={styles.image} />}
|
|
141
141
|
<View style={styles.content}>
|
|
142
142
|
<Text typography={'title_xs'} numberOfLines={1}>
|
|
143
143
|
{title}
|
|
@@ -147,7 +147,7 @@ const PopupNotify: React.FC<PopupNotifyProps> = ({
|
|
|
147
147
|
{description}
|
|
148
148
|
</Text>
|
|
149
149
|
</View>
|
|
150
|
-
{information
|
|
150
|
+
{!!information && (
|
|
151
151
|
<View style={styles.information}>
|
|
152
152
|
<Text
|
|
153
153
|
typography={'description_xs'}
|
package/Radio/index.tsx
CHANGED
package/Tag/index.tsx
CHANGED
|
@@ -62,7 +62,12 @@ const Tag: FC<TagProps> = ({
|
|
|
62
62
|
return (
|
|
63
63
|
<View style={[style, sizeStyle, {backgroundColor: tagColor}]}>
|
|
64
64
|
{!!icon && (
|
|
65
|
-
<Icon
|
|
65
|
+
<Icon
|
|
66
|
+
style={styles.icon}
|
|
67
|
+
size={16}
|
|
68
|
+
source={icon as string}
|
|
69
|
+
color={labelColor}
|
|
70
|
+
/>
|
|
66
71
|
)}
|
|
67
72
|
<Text color={labelColor} typography={'label_s'}>
|
|
68
73
|
{label}
|