|
1 | 1 | import { useMemo } from 'react'; |
2 | | -import { View, Text } from 'react-native'; |
| 2 | +import { View, Text, Image } from 'react-native'; |
3 | 3 |
|
4 | 4 | import { IterableEmbeddedViewType } from '../enums/IterableEmbeddedViewType'; |
5 | 5 |
|
@@ -45,40 +45,14 @@ export const IterableEmbeddedView = ({ |
45 | 45 | } |
46 | 46 | }, [viewType]); |
47 | 47 |
|
48 | | - const { parsedStyles } = useEmbeddedView(viewType, props); |
| 48 | + const { media } = useEmbeddedView(viewType, props); |
49 | 49 |
|
50 | 50 | return Cmp ? ( |
51 | 51 | <View> |
52 | | - <Text> |
53 | | - parsedStyles.backgroundColor: {String(parsedStyles.backgroundColor)} |
54 | | - </Text> |
55 | | - <Text>parsedStyles.borderColor: {String(parsedStyles.borderColor)}</Text> |
56 | | - <Text>parsedStyles.borderWidth: {parsedStyles.borderWidth}</Text> |
57 | | - <Text> |
58 | | - parsedStyles.borderCornerRadius: {parsedStyles.borderCornerRadius} |
59 | | - </Text> |
60 | | - <Text> |
61 | | - parsedStyles.primaryBtnBackgroundColor:{' '} |
62 | | - {String(parsedStyles.primaryBtnBackgroundColor)} |
63 | | - </Text> |
64 | | - <Text> |
65 | | - parsedStyles.primaryBtnTextColor:{' '} |
66 | | - {String(parsedStyles.primaryBtnTextColor)} |
67 | | - </Text> |
68 | | - <Text> |
69 | | - parsedStyles.secondaryBtnBackgroundColor:{' '} |
70 | | - {String(parsedStyles.secondaryBtnBackgroundColor)} |
71 | | - </Text> |
72 | | - <Text> |
73 | | - parsedStyles.secondaryBtnTextColor:{' '} |
74 | | - {String(parsedStyles.secondaryBtnTextColor)} |
75 | | - </Text> |
76 | | - <Text> |
77 | | - parsedStyles.titleTextColor: {String(parsedStyles.titleTextColor)} |
78 | | - </Text> |
79 | | - <Text> |
80 | | - parsedStyles.bodyTextColor: {String(parsedStyles.bodyTextColor)} |
81 | | - </Text> |
| 52 | + <Text>media.url: {media.url}</Text> |
| 53 | + <Text>media.caption: {media.caption}</Text> |
| 54 | + <Text>media.shouldShow: {media.shouldShow ? 'true' : 'false'}</Text> |
| 55 | + {media.url ? <Image source={{ uri: media.url }} width={100} height={100} /> : null} |
82 | 56 | <Cmp {...props} /> |
83 | 57 | </View> |
84 | 58 | ) : null; |
|
0 commit comments