@momo-kits/qrcode 0.0.3-beta → 0.0.6
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/BarCodeView.js +2 -14
- package/QRCodeView.js +2 -15
- package/package.json +14 -14
- package/publish.sh +1 -1
package/BarCodeView.js
CHANGED
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import {
|
|
3
|
+
import { ViewPropTypes, PixelRatio } from 'react-native';
|
|
4
|
+
import { RCTBarCode } from '@momo-kits/core';
|
|
4
5
|
|
|
5
|
-
const iface = {
|
|
6
|
-
name: 'RCTBarCode',
|
|
7
|
-
propTypes: {
|
|
8
|
-
code: PropTypes.string,
|
|
9
|
-
width: PropTypes.number,
|
|
10
|
-
height: PropTypes.number,
|
|
11
|
-
ratio: PropTypes.number,
|
|
12
|
-
...ViewPropTypes,
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const RCTBarCode = requireNativeComponent('RCTBarCode', iface);
|
|
17
6
|
const ratio = PixelRatio.get();
|
|
18
|
-
|
|
19
7
|
function BarCodeView(props) {
|
|
20
8
|
return (
|
|
21
9
|
<RCTBarCode ratio={ratio} {...props} />
|
package/QRCodeView.js
CHANGED
|
@@ -1,21 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
} from 'react-native';
|
|
3
|
+
import { ViewPropTypes, PixelRatio, Image } from 'react-native';
|
|
4
|
+
import { RCTQRCode } from '@momo-kits/core';
|
|
6
5
|
|
|
7
|
-
const iface = {
|
|
8
|
-
name: 'QRCodeView',
|
|
9
|
-
propTypes: {
|
|
10
|
-
code: PropTypes.string,
|
|
11
|
-
size: PropTypes.number,
|
|
12
|
-
ratio: PropTypes.number,
|
|
13
|
-
showLogo: PropTypes.bool,
|
|
14
|
-
...ViewPropTypes,
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const RCTQRCode = requireNativeComponent('RCTQRCode', iface);
|
|
19
6
|
const ratio = PixelRatio.get();
|
|
20
7
|
const ic_logo = 'https://img.mservice.io/momo_app_v2/new_version/img/appx_image/ic_momo.png';
|
|
21
8
|
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
"name": "@momo-kits/qrcode",
|
|
3
|
+
"version": "0.0.6",
|
|
4
|
+
"private": false,
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"dependencies": {},
|
|
7
|
+
"peerDependencies": {
|
|
8
|
+
"react-native": ">=0.55",
|
|
9
|
+
"prop-types": "^15.7.2",
|
|
10
|
+
"react": "16.9.0",
|
|
11
|
+
"@momo-kits/core": "latest"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {},
|
|
14
|
+
"license": "MoMo"
|
|
15
|
+
}
|
package/publish.sh
CHANGED
|
@@ -12,7 +12,7 @@ echo VERSION: $VERSION
|
|
|
12
12
|
rsync -r --verbose --exclude '*.mdx' --exclude '*Demo.js' --exclude 'props-type.js' --exclude 'prop-types.js' ./* dist
|
|
13
13
|
|
|
14
14
|
# #babel component to dist
|
|
15
|
-
babel ./dist -d dist --copy-files
|
|
15
|
+
#babel ./dist -d dist --copy-files
|
|
16
16
|
|
|
17
17
|
#copy option
|
|
18
18
|
#cp -r ./src/ dist
|