@momo-kits/template 0.89.5 → 0.89.6-rc.1
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/HeaderSliderBanner/index.tsx +2 -1
- package/TrustBanner/CustomAvatar.tsx +1 -1
- package/TrustBanner/index.tsx +3 -3
- package/TrustBanner/styles.ts +8 -8
- package/TrustBanner/types.ts +1 -1
- package/index.tsx +1 -0
- package/package.json +2 -2
- package/publish.sh +21 -22
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, {FC} from 'react';
|
|
2
2
|
import {Animated, TouchableOpacity} from 'react-native';
|
|
3
|
-
import Carousel from '@momo-kits/carousel';
|
|
3
|
+
import {Carousel} from '@momo-kits/carousel';
|
|
4
4
|
import {Image, Pagination, Spacing} from '@momo-kits/foundation';
|
|
5
5
|
import {HeaderSliderBannerProps} from './types';
|
|
6
6
|
|
|
@@ -41,6 +41,7 @@ const HeaderSliderBanner: FC<HeaderSliderBannerProps> = ({
|
|
|
41
41
|
return (
|
|
42
42
|
<TouchableOpacity disabled={!onPressItem} onPress={onPressItem}>
|
|
43
43
|
<Image
|
|
44
|
+
style={{width: '100%', height: '100%'}}
|
|
44
45
|
key={`Header banner ${item}_${index}`}
|
|
45
46
|
source={{
|
|
46
47
|
uri: item,
|
package/TrustBanner/index.tsx
CHANGED
|
@@ -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]}>
|
|
@@ -133,7 +133,7 @@ const TrustBanner: FC<TrustBannerProps> = ({
|
|
|
133
133
|
<Text
|
|
134
134
|
style={styles.message}
|
|
135
135
|
color={theme.colors.text.secondary}
|
|
136
|
-
typography={'
|
|
136
|
+
typography={'description_default_regular'}>
|
|
137
137
|
{content?.[language || 'vi'] || defaultData.content.vi}
|
|
138
138
|
</Text>
|
|
139
139
|
{renderFooter()}
|
package/TrustBanner/styles.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {StyleSheet} from 'react-native';
|
|
2
|
-
import {Colors, Radius,
|
|
2
|
+
import {Colors, Radius, Spacing} from '@momo-kits/foundation';
|
|
3
3
|
|
|
4
4
|
export default StyleSheet.create({
|
|
5
5
|
container: {
|
|
@@ -11,13 +11,13 @@ export default StyleSheet.create({
|
|
|
11
11
|
},
|
|
12
12
|
flex: {flex: 1},
|
|
13
13
|
momoImage: {
|
|
14
|
-
width:
|
|
15
|
-
height:
|
|
14
|
+
width: 64,
|
|
15
|
+
height: 64,
|
|
16
16
|
marginRight: Spacing.S,
|
|
17
17
|
},
|
|
18
18
|
image: {
|
|
19
|
-
width:
|
|
20
|
-
height:
|
|
19
|
+
width: 52,
|
|
20
|
+
height: 20,
|
|
21
21
|
},
|
|
22
22
|
imageList: {
|
|
23
23
|
flexDirection: 'row',
|
|
@@ -31,13 +31,13 @@ export default StyleSheet.create({
|
|
|
31
31
|
justifyContent: 'space-between',
|
|
32
32
|
},
|
|
33
33
|
customAvatar: {
|
|
34
|
-
width:
|
|
35
|
-
height:
|
|
34
|
+
width: 24,
|
|
35
|
+
height: 24,
|
|
36
36
|
borderWidth: 1,
|
|
37
37
|
borderRadius: Radius.L,
|
|
38
38
|
alignItems: 'center',
|
|
39
39
|
justifyContent: 'center',
|
|
40
|
-
marginLeft:
|
|
40
|
+
marginLeft: -6,
|
|
41
41
|
},
|
|
42
42
|
iconList: {
|
|
43
43
|
flexDirection: 'row',
|
package/TrustBanner/types.ts
CHANGED
package/index.tsx
CHANGED
package/package.json
CHANGED
package/publish.sh
CHANGED
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Prepare dist files
|
|
2
4
|
rm -rf dist
|
|
3
5
|
mkdir dist
|
|
4
|
-
|
|
5
|
-
cp . ./dist
|
|
6
|
-
|
|
7
|
-
# GET VERSION from mck_package.json
|
|
8
|
-
VERSIONSTRING=( v$(jq .version package.json) )
|
|
9
|
-
VERSION=(${VERSIONSTRING//[\"]/})
|
|
10
|
-
echo VERSION: $VERSION
|
|
11
|
-
|
|
12
|
-
rsync -r --verbose --exclude '*.mdx' --exclude '*Demo.js' --exclude 'props-type.js' --exclude 'prop-types.js' ./* dist
|
|
13
|
-
|
|
14
|
-
# #babel component to dist
|
|
15
|
-
#babel ./dist -d dist --copy-files
|
|
16
|
-
|
|
17
|
-
#copy option
|
|
18
|
-
#cp -r ./src/ dist
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
#npm login
|
|
22
|
-
#publish dist to npm
|
|
6
|
+
rsync -r --exclude=/dist ./* dist
|
|
23
7
|
cd dist
|
|
24
|
-
|
|
8
|
+
|
|
9
|
+
if [ "$1" == "stable" ]; then
|
|
10
|
+
npm version $(npm view @momo-kits/foundation@stable version)
|
|
11
|
+
npm version patch
|
|
12
|
+
npm publish --tag stable --access=public
|
|
13
|
+
elif [ "$1" == "latest" ]; then
|
|
14
|
+
npm version $(npm view @momo-kits/foundation@latest version)
|
|
15
|
+
npm publish --tag latest --access=public
|
|
16
|
+
else
|
|
17
|
+
npm version $(npm view @momo-kits/template@beta version)
|
|
18
|
+
npm version prerelease --preid=beta
|
|
19
|
+
npm publish --tag beta --access=public
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
PACKAGE_NAME=$(npm pkg get name)
|
|
23
|
+
NEW_PACKAGE_VERSION=$(npm pkg get version)
|
|
24
|
+
|
|
25
|
+
# Clean up
|
|
25
26
|
cd ..
|
|
26
27
|
rm -rf dist
|
|
27
|
-
|
|
28
|
-
##curl -X POST -H 'Content-Type: application/json' 'https://chat.googleapis.com/v1/spaces/AAAAbP8987c/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=UGSFRvk_oYb9uGsAgs31bVvMm6jDkmD8zihGm3eyaQA%3D&threadKey=JoaXTEYaNNkl' -d '{"text": "@momo-kits/bank new version release: '*"$VERSION"*' `https://www.npmjs.com/package/@momo-kits/avatar`"}'
|