@applicaster/zapp-react-native-ui-components 14.0.0-alpha.2345544020 → 14.0.0-alpha.6931095759
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,17 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { View, Image } from "react-native";
|
|
2
|
+
import { View, Image, StyleSheet } from "react-native";
|
|
3
3
|
import { toNumberWithDefaultZero } from "@applicaster/zapp-react-native-utils/numberUtils";
|
|
4
4
|
|
|
5
|
+
const styles = StyleSheet.create({
|
|
6
|
+
container: {
|
|
7
|
+
marginHorizontal: 24,
|
|
8
|
+
},
|
|
9
|
+
image: {
|
|
10
|
+
width: 400,
|
|
11
|
+
height: 400,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
|
|
5
15
|
type Props = {
|
|
6
16
|
srcImage: string;
|
|
7
17
|
config?: {
|
|
@@ -14,24 +24,15 @@ type Props = {
|
|
|
14
24
|
};
|
|
15
25
|
};
|
|
16
26
|
|
|
17
|
-
const containerStyles = {
|
|
18
|
-
marginHorizontal: 24,
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const imageStyles = {
|
|
22
|
-
width: 400,
|
|
23
|
-
height: 400,
|
|
24
|
-
};
|
|
25
|
-
|
|
26
27
|
export function Artwork({ srcImage, config }: Props) {
|
|
27
28
|
const borderRadius = toNumberWithDefaultZero(config.artworkBorderRadius);
|
|
28
29
|
|
|
29
30
|
return (
|
|
30
|
-
<View style={
|
|
31
|
+
<View style={styles.container}>
|
|
31
32
|
<Image
|
|
32
33
|
fadeDuration={0}
|
|
33
34
|
source={{ uri: srcImage }}
|
|
34
|
-
style={{
|
|
35
|
+
style={[styles.image, { borderRadius }]}
|
|
35
36
|
resizeMode="cover"
|
|
36
37
|
/>
|
|
37
38
|
</View>
|
|
@@ -17,11 +17,15 @@ exports[`<Artwork /> renders correctly 1`] = `
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
style={
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
[
|
|
21
|
+
{
|
|
22
|
+
"height": 400,
|
|
23
|
+
"width": 400,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"borderRadius": 0,
|
|
27
|
+
},
|
|
28
|
+
]
|
|
25
29
|
}
|
|
26
30
|
/>
|
|
27
31
|
</View>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-ui-components",
|
|
3
|
-
"version": "14.0.0-alpha.
|
|
3
|
+
"version": "14.0.0-alpha.6931095759",
|
|
4
4
|
"description": "Applicaster Zapp React Native ui components for the Quick Brick App",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"redux-mock-store": "^1.5.3"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@applicaster/applicaster-types": "14.0.0-alpha.
|
|
35
|
-
"@applicaster/zapp-react-native-bridge": "14.0.0-alpha.
|
|
36
|
-
"@applicaster/zapp-react-native-redux": "14.0.0-alpha.
|
|
37
|
-
"@applicaster/zapp-react-native-utils": "14.0.0-alpha.
|
|
34
|
+
"@applicaster/applicaster-types": "14.0.0-alpha.6931095759",
|
|
35
|
+
"@applicaster/zapp-react-native-bridge": "14.0.0-alpha.6931095759",
|
|
36
|
+
"@applicaster/zapp-react-native-redux": "14.0.0-alpha.6931095759",
|
|
37
|
+
"@applicaster/zapp-react-native-utils": "14.0.0-alpha.6931095759",
|
|
38
38
|
"promise": "^8.3.0",
|
|
39
39
|
"url": "^0.11.0",
|
|
40
40
|
"uuid": "^3.3.2"
|