@applicaster/zapp-react-native-ui-components 13.0.0-rc.132 → 13.0.0-rc.133

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,5 +1,16 @@
1
1
  import React from "react";
2
- import { View, Image } from "react-native";
2
+ import { View, Image, StyleSheet } from "react-native";
3
+ import { toNumberWithDefaultZero } from "@applicaster/zapp-react-native-utils/numberUtils";
4
+
5
+ const styles = StyleSheet.create({
6
+ container: {
7
+ marginHorizontal: 24,
8
+ },
9
+ image: {
10
+ width: 400,
11
+ height: 400,
12
+ },
13
+ });
3
14
 
4
15
  type Props = {
5
16
  srcImage: string;
@@ -9,25 +20,19 @@ type Props = {
9
20
  backgroundColor: string;
10
21
  backgroundImage: string;
11
22
  isRTL: boolean;
23
+ artworkBorderRadius: Option<number>;
12
24
  };
13
25
  };
14
26
 
15
- const containerStyles = {
16
- marginHorizontal: 24,
17
- };
18
-
19
- const imageStyles = {
20
- width: 400,
21
- height: 400,
22
- };
27
+ export function Artwork({ srcImage, config }: Props) {
28
+ const borderRadius = toNumberWithDefaultZero(config.artworkBorderRadius);
23
29
 
24
- export function Artwork({ srcImage }: Props) {
25
30
  return (
26
- <View style={containerStyles}>
31
+ <View style={styles.container}>
27
32
  <Image
28
33
  fadeDuration={0}
29
34
  source={{ uri: srcImage }}
30
- style={imageStyles}
35
+ style={[styles.image, { borderRadius }]}
31
36
  resizeMode="cover"
32
37
  />
33
38
  </View>
@@ -72,6 +72,7 @@ export function AudioPlayer(props: Props) {
72
72
  const artworkAspectRatio = getProp("audio_player_artwork_aspect_ratio");
73
73
  const channelIcon = getProp("audio_player_channel_icon");
74
74
  const rtlFlag = getProp("audio_player_rtl");
75
+ const artworkBorderRadius = getProp("audio_player_artwork_border_radius");
75
76
 
76
77
  const audioPlayerBackgroundImageDefaultColor = getProp(
77
78
  "audio_player_background_image_default_color"
@@ -154,6 +155,7 @@ export function AudioPlayer(props: Props) {
154
155
  artworkAspectRatio,
155
156
  channelIcon,
156
157
  audioPlayerBackgroundImageDefaultColor,
158
+ artworkBorderRadius,
157
159
  };
158
160
  }, [getProp]);
159
161
 
@@ -14,6 +14,7 @@ type Props = {
14
14
  backgroundColor: string;
15
15
  backgroundImage: string;
16
16
  isRTL: boolean;
17
+ artworkBorderRadius: Option<number>;
17
18
  };
18
19
  children: React.ReactNode;
19
20
  style: ViewStyle;
@@ -17,10 +17,15 @@ exports[`<Artwork /> renders correctly 1`] = `
17
17
  }
18
18
  }
19
19
  style={
20
- {
21
- "height": 400,
22
- "width": 400,
23
- }
20
+ [
21
+ {
22
+ "height": 400,
23
+ "width": 400,
24
+ },
25
+ {
26
+ "borderRadius": 0,
27
+ },
28
+ ]
24
29
  }
25
30
  />
26
31
  </View>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-ui-components",
3
- "version": "13.0.0-rc.132",
3
+ "version": "13.0.0-rc.133",
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": "13.0.0-rc.132",
35
- "@applicaster/zapp-react-native-bridge": "13.0.0-rc.132",
36
- "@applicaster/zapp-react-native-redux": "13.0.0-rc.132",
37
- "@applicaster/zapp-react-native-utils": "13.0.0-rc.132",
34
+ "@applicaster/applicaster-types": "13.0.0-rc.133",
35
+ "@applicaster/zapp-react-native-bridge": "13.0.0-rc.133",
36
+ "@applicaster/zapp-react-native-redux": "13.0.0-rc.133",
37
+ "@applicaster/zapp-react-native-utils": "13.0.0-rc.133",
38
38
  "promise": "^8.3.0",
39
39
  "react-router-native": "^5.1.2",
40
40
  "url": "^0.11.0",