@momo-kits/template 0.81.60 → 0.81.61
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, {FC} from 'react';
|
|
2
|
-
import {Animated, TouchableOpacity} from 'react-native';
|
|
2
|
+
import {Animated, TouchableOpacity, Image} from 'react-native';
|
|
3
3
|
import {Carousel} from '@momo-kits/carousel';
|
|
4
|
-
import {
|
|
4
|
+
import {Pagination, Spacing} from '@momo-kits/foundation';
|
|
5
5
|
import {HeaderSliderBannerProps} from './types';
|
|
6
6
|
|
|
7
7
|
const HeaderSliderBanner: FC<HeaderSliderBannerProps> = ({
|
|
@@ -41,7 +41,7 @@ const HeaderSliderBanner: FC<HeaderSliderBannerProps> = ({
|
|
|
41
41
|
return (
|
|
42
42
|
<TouchableOpacity disabled={!onPressItem} onPress={onPressItem}>
|
|
43
43
|
<Image
|
|
44
|
-
style={{width:
|
|
44
|
+
style={{width: '100%', height: '100%'}}
|
|
45
45
|
key={`Header banner ${item}_${index}`}
|
|
46
46
|
source={{
|
|
47
47
|
uri: item,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, {FC, useContext} from 'react';
|
|
2
|
-
import {View} from 'react-native';
|
|
2
|
+
import {View, Image} from 'react-native';
|
|
3
3
|
import styles from './styles';
|
|
4
|
-
import {ApplicationContext, Colors,
|
|
4
|
+
import {ApplicationContext, Colors, Text} from '@momo-kits/foundation';
|
|
5
5
|
import {CustomAvatarProps} from './types';
|
|
6
6
|
|
|
7
7
|
const CustomAvatar: FC<CustomAvatarProps> = ({image, text, style}) => {
|
|
@@ -10,9 +10,7 @@ const CustomAvatar: FC<CustomAvatarProps> = ({image, text, style}) => {
|
|
|
10
10
|
const renderContent = () => {
|
|
11
11
|
if (text) {
|
|
12
12
|
return (
|
|
13
|
-
<Text
|
|
14
|
-
color={theme.colors.primary}
|
|
15
|
-
typography={'description_xs'}>
|
|
13
|
+
<Text color={theme.colors.primary} typography={'description_xs'}>
|
|
16
14
|
{text}
|
|
17
15
|
</Text>
|
|
18
16
|
);
|
package/TrustBanner/index.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, {FC, useContext, useEffect, useState} from 'react';
|
|
2
|
-
import {NativeModules, TouchableOpacity, View} from 'react-native';
|
|
2
|
+
import {NativeModules, TouchableOpacity, View, Image} from 'react-native';
|
|
3
3
|
import {TrustBannerCallbackParams, TrustBannerProps} from './types';
|
|
4
4
|
import styles from './styles';
|
|
5
|
-
import {ApplicationContext, Colors,
|
|
5
|
+
import {ApplicationContext, Colors, Text} from '@momo-kits/foundation';
|
|
6
6
|
import CustomAvatar from './CustomAvatar';
|
|
7
7
|
import MaxApi from '@momo-platform/api';
|
|
8
8
|
|
|
@@ -29,7 +29,7 @@ const TrustBanner: FC<TrustBannerProps> = ({
|
|
|
29
29
|
screenName = '',
|
|
30
30
|
serviceName = '',
|
|
31
31
|
trackEvent,
|
|
32
|
-
|
|
32
|
+
disabledPress = false,
|
|
33
33
|
}) => {
|
|
34
34
|
const {theme, language} = useContext(ApplicationContext);
|
|
35
35
|
const [data, setData] = useState(defaultData);
|
|
@@ -118,7 +118,7 @@ const TrustBanner: FC<TrustBannerProps> = ({
|
|
|
118
118
|
|
|
119
119
|
return (
|
|
120
120
|
<TouchableOpacity
|
|
121
|
-
|
|
121
|
+
disabled={disabledPress}
|
|
122
122
|
onPress={_onPress}
|
|
123
123
|
activeOpacity={0.7}
|
|
124
124
|
style={[style, styles.container]}>
|