@quintype/native-components 2.20.0-fix-rtl-issues.2 → 2.20.1-temp-fast-image-constraint.0

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.
Files changed (33) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/package.json +2 -2
  3. package/src/Icons/ClockIcon/index.js +9 -5
  4. package/src/components/ActionText/ActionText.js +7 -9
  5. package/src/components/ActionText/ActionText.test.js +5 -12
  6. package/src/components/AlsoRead/index.js +1 -1
  7. package/src/components/AlsoRead/styles.js +2 -0
  8. package/src/components/AuthorRow/AuthorRow.test.js +4 -9
  9. package/src/components/AuthorRow/index.js +23 -21
  10. package/src/components/BackNavigator/styles.js +2 -0
  11. package/src/components/Button/index.js +13 -9
  12. package/src/components/CustomSwitch/index.js +16 -10
  13. package/src/components/Header/index.js +13 -9
  14. package/src/components/PrimaryStoryCard/index.js +43 -18
  15. package/src/components/PrimaryStoryCard/styles.js +29 -5
  16. package/src/components/PrimaryStoryCardNew/index.js +51 -17
  17. package/src/components/PrimaryStoryCardNew/styles.js +29 -5
  18. package/src/components/RadioButton/index.js +24 -9
  19. package/src/components/SecondaryStoryCard/index.js +46 -16
  20. package/src/components/SecondaryStoryCard/styles.js +29 -4
  21. package/src/components/SecondaryStoryCardNew/index.js +52 -14
  22. package/src/components/SecondaryStoryCardNew/styles.js +28 -4
  23. package/src/components/ShareButton/index.js +18 -14
  24. package/src/components/StoryHeader/index.js +5 -5
  25. package/src/components/StoryHeader/styles.js +1 -1
  26. package/src/components/StoryImage/index.js +1 -1
  27. package/src/components/Table/index.js +1 -1
  28. package/src/components/Table/styles.js +5 -2
  29. package/src/components/TextQandA/styles.js +3 -3
  30. package/src/constants/component-constants/content-constants/constants.js +7 -5
  31. package/src/constants/component-constants/general-constants/constants.js +22 -14
  32. package/src/constants/renderHTML.js +10 -0
  33. package/src/utils/timeUtils.js +2 -2
@@ -1,7 +1,8 @@
1
1
  import { get, throttle } from "lodash";
2
2
  import PropTypes from "prop-types";
3
3
  import React, { useContext, memo } from "react";
4
- import { I18nManager, StyleSheet, TouchableOpacity, View } from "react-native";
4
+ import { StyleSheet, TouchableOpacity, View } from "react-native";
5
+ import Icon from "react-native-vector-icons/FontAwesome";
5
6
  import {
6
7
  AppTheme,
7
8
  getImageMetadata,
@@ -11,17 +12,16 @@ import {
11
12
  import { getStoryHeadline } from "../../utils/story";
12
13
  import { ResponsiveImage, Text } from "../index";
13
14
  import { storyStyles } from "./styles";
14
-
15
-
15
+ import { COMP_GENERAL_CONSTANTS } from "../../constants/component-constants/general-constants/constants";
16
16
 
17
17
  const PrimaryStoryCardNewBase = (props) => {
18
18
  const { story = {} } = props;
19
19
  const { theme } = useContext(AppTheme);
20
- const { COLORS, FONT_SIZE, locale } = theme || {};
20
+ const { COLORS, FONT_SIZE, locale, DARK_MODE } = theme || {};
21
21
 
22
22
  const translate = get(theme, ["translate"], (word) => word);
23
23
 
24
- const styles = storyStyles(COLORS, FONT_SIZE);
24
+ const styles = storyStyles(COLORS, FONT_SIZE, DARK_MODE);
25
25
  const containerStyle = StyleSheet.flatten([
26
26
  styles.container,
27
27
  { paddingHorizontal: props.horizontalPadding },
@@ -37,14 +37,41 @@ const PrimaryStoryCardNewBase = (props) => {
37
37
 
38
38
  const DATE_FORMAT = "d MMM, yyyy";
39
39
  const readTime = story["read-time"]
40
- ? `${story["read-time"]} ${translate("min read")}`
40
+ ? `${story["read-time"]} ${translate("min read")} · `
41
41
  : "";
42
42
 
43
43
  const throttledOnpress = throttle(props.onPress, 1000);
44
44
 
45
+ const showIcon = (name) => (
46
+ <View style={styles.storyType}>
47
+ <Icon name={name} size={22} color={COLORS.BRAND_BLACK} />
48
+ </View>
49
+ );
50
+
51
+ const showLiveBlogIcon = () => (
52
+ <View style={styles.storyType}>
53
+ <View style={styles.liveBlogIcon} />
54
+ <Text style={styles.liveBlogText}>LIVE</Text>
55
+ </View>
56
+ );
57
+ const showStoryType = () => {
58
+ switch (story["story-template"]) {
59
+ case "text":
60
+ return null;
61
+ case "photo":
62
+ return showIcon("photo");
63
+ case "video":
64
+ return showIcon("play");
65
+ case "live-blog":
66
+ return showLiveBlogIcon();
67
+ default:
68
+ null;
69
+ }
70
+ };
71
+
45
72
  return (
46
73
  <TouchableOpacity
47
- testID="primaryStoryCardView"
74
+ testID={COMP_GENERAL_CONSTANTS.primaryStoryCard}
48
75
  onPress={throttledOnpress}
49
76
  activeOpacity={0.8}
50
77
  style={containerStyle}
@@ -54,7 +81,9 @@ const PrimaryStoryCardNewBase = (props) => {
54
81
  slug={getImageSlug(story)}
55
82
  cdn={props.cdn}
56
83
  imageWidth={props.imageWidth}
57
- />
84
+ >
85
+ <View style={styles.storyTypeContainer}>{showStoryType()}</View>
86
+ </ResponsiveImage>
58
87
  <View style={styles.contentContainer}>
59
88
  <View style={styles.headlineAndTimestampContainer}>
60
89
  <Text
@@ -62,18 +91,23 @@ const PrimaryStoryCardNewBase = (props) => {
62
91
  numberOfLines={3}
63
92
  ellipsizeMode="tail"
64
93
  style={headlineStyle}
65
- testID="primaryStoryCardHeadline"
94
+ testID={COMP_GENERAL_CONSTANTS.primaryStoryHeadline}
66
95
  >
67
96
  {getStoryHeadline(story)}
68
97
  </Text>
69
- <View style={styles.timestampContainer}>
70
- {readTime ? (
71
- <Text style={timestampStyle}>{`${readTime} · `}</Text>
72
- ) : null}
73
- <Text style={timestampStyle} testID="primaryStoryCardDate">
74
- {getTimeForStoryCards(story["published-at"], DATE_FORMAT, locale)}
75
- </Text>
76
- </View>
98
+ <Text
99
+ style={timestampStyle}
100
+ numberOfLines={2}
101
+ // TODO: Add corrected testID here
102
+ >
103
+ {readTime +
104
+ getTimeForStoryCards(
105
+ story["published-at"],
106
+ DATE_FORMAT,
107
+ locale,
108
+ translate
109
+ )}
110
+ </Text>
77
111
  </View>
78
112
  <View style={styles.icon}>{props.iconComponent}</View>
79
113
  </View>
@@ -12,16 +12,12 @@ export const storyStyles = (COLORS = {}, FONT_SIZE = {}) => ({
12
12
  flexShrink: 1,
13
13
  flex: 1,
14
14
  },
15
- timestampContainer: {
16
- alignItems: 'center',
17
- flexDirection: 'row',
18
- marginTop: 4,
19
- },
20
15
  timestamp: {
21
16
  color: COLORS?.BRAND_BLACK,
22
17
  fontSize: FONT_SIZE.h5,
23
18
  lineHeight: FONT_SIZE.h5 * 1.2,
24
19
  opacity: 0.6,
20
+ marginTop: 4,
25
21
  },
26
22
  headline: {
27
23
  fontSize: FONT_SIZE.title,
@@ -33,4 +29,32 @@ export const storyStyles = (COLORS = {}, FONT_SIZE = {}) => ({
33
29
  icon: {
34
30
  marginLeft: 8,
35
31
  },
32
+ storyTypeContainer: {
33
+ position: 'absolute',
34
+ bottom: 0,
35
+ left: 0,
36
+ },
37
+ storyType: {
38
+ backgroundColor: COLORS.MONO1,
39
+ padding: 8,
40
+ justifyContent: 'space-between',
41
+ alignItems: 'space-between',
42
+ flexDirection: 'row',
43
+ },
44
+ storyTypeText: {
45
+ color: COLORS.MONO7,
46
+ fontSize: FONT_SIZE.h5,
47
+ },
48
+ liveBlogText: {
49
+ color: COLORS.MONO7,
50
+ fontSize: FONT_SIZE.h4,
51
+ marginLeft: 10,
52
+ fontWeight: 'bold',
53
+ },
54
+ liveBlogIcon: {
55
+ height: 15,
56
+ width: 15,
57
+ borderRadius: 50,
58
+ backgroundColor: COLORS.BRAND_3,
59
+ },
36
60
  });
@@ -1,22 +1,37 @@
1
- import React, { useContext } from 'react';
1
+ import React, { useContext } from "react";
2
2
  import {
3
- StyleSheet, View, TouchableOpacity, ViewPropTypes,
4
- } from 'react-native';
5
- import PropTypes from 'prop-types';
6
- import { radioButtonStyles } from './styles';
7
- import { AppTheme } from '../../utils';
3
+ StyleSheet,
4
+ View,
5
+ TouchableOpacity,
6
+ ViewPropTypes,
7
+ } from "react-native";
8
+ import PropTypes from "prop-types";
9
+ import { radioButtonStyles } from "./styles";
10
+ import { AppTheme } from "../../utils";
11
+
12
+ import { COMP_GENERAL_CONSTANTS } from "../../constants/component-constants";
8
13
 
9
14
  export const RadioButton = ({
10
- onPress, isChecked, circleStyle, checkedCircleStyle,
15
+ onPress,
16
+ isChecked,
17
+ circleStyle,
18
+ checkedCircleStyle,
11
19
  }) => {
12
20
  const { theme } = useContext(AppTheme);
13
21
  const styles = radioButtonStyles(theme);
14
22
  const circleBorderStyle = StyleSheet.flatten([styles.circle, circleStyle]);
15
- const checkedStyle = StyleSheet.flatten([styles.checkedCircle, checkedCircleStyle]);
23
+ const checkedStyle = StyleSheet.flatten([
24
+ styles.checkedCircle,
25
+ checkedCircleStyle,
26
+ ]);
16
27
 
17
28
  return (
18
29
  <View>
19
- <TouchableOpacity style={circleBorderStyle} onPress={onPress}>
30
+ <TouchableOpacity
31
+ style={circleBorderStyle}
32
+ onPress={onPress}
33
+ testID={COMP_GENERAL_CONSTANTS.radioButtonTouch}
34
+ >
20
35
  {isChecked && <View style={checkedStyle} />}
21
36
  </TouchableOpacity>
22
37
  </View>
@@ -10,11 +10,12 @@ import {
10
10
  TextStyle,
11
11
  TouchableOpacityProps,
12
12
  } from 'react-native';
13
+ import Icon from 'react-native-vector-icons/FontAwesome';
13
14
  import {
14
15
  AppTheme,
15
16
  getImageMetadata,
16
17
  getImageSlug,
17
- getTimeInFormat,
18
+ getTimeForStoryCards,
18
19
  } from '../../utils';
19
20
  import { getStoryHeadline } from '../../utils/story';
20
21
  import { ResponsiveImage, Text } from '../index';
@@ -25,7 +26,7 @@ export const SecondaryStoryCard = (props) => {
25
26
  const { theme } = useContext(AppTheme);
26
27
  const translate = get(theme, ['translate'], (word) => word);
27
28
 
28
- const { locale } = theme;
29
+ const { locale, COLORS } = theme;
29
30
  const styles = secStoryCardStyles(theme);
30
31
  const { story = {} } = props;
31
32
 
@@ -53,6 +54,35 @@ export const SecondaryStoryCard = (props) => {
53
54
  const readTime = story['read-time'] ? `${story['read-time']} ${translate('min read')}` : '';
54
55
 
55
56
  const throttledOnpress = throttle(props.onPress, 1000);
57
+
58
+ const showIcon = (name) => (
59
+ <View style={styles.storyType}>
60
+ <Icon name={name} size={14} color={COLORS.MONO7} />
61
+ </View>
62
+ );
63
+
64
+ const showLiveBlogIcon = () => (
65
+ <View style={styles.storyType}>
66
+ <View style={styles.liveBlogIcon} />
67
+ <Text style={styles.liveBlogText}>LIVE</Text>
68
+ </View>
69
+ );
70
+
71
+ const showStoryType = () => {
72
+ switch (story['story-template']) {
73
+ case 'text':
74
+ return null;
75
+ case 'photo':
76
+ return showIcon('photo');
77
+ case 'video':
78
+ return showIcon('play');
79
+ case 'live-blog':
80
+ return showLiveBlogIcon();
81
+ default:
82
+ null;
83
+ }
84
+ };
85
+
56
86
  return (
57
87
  <TouchableOpacity
58
88
  testID={COMP_GENERAL_CONSTANTS.secondaryStoryCard}
@@ -73,6 +103,7 @@ export const SecondaryStoryCard = (props) => {
73
103
  </View>
74
104
  )}
75
105
  </Text>
106
+ <View style={styles.storyTypeContainer}>{showStoryType()}</View>
76
107
  </ResponsiveImage>
77
108
  <View style={styles.headlineAndAuthorBlockContainer}>
78
109
  <Text
@@ -85,20 +116,19 @@ export const SecondaryStoryCard = (props) => {
85
116
  {getStoryHeadline(story)?.trim()}
86
117
  </Text>
87
118
  <View style={styles.authorAndIconContainer}>
88
- <View style={authorTextContainerStyle}>
89
- <Text
90
- style={authorTextStyle}
91
- testID={COMP_GENERAL_CONSTANTS.secondaryStoryAuthor}
92
- >
93
- {authorName}
94
- </Text>
95
- <Text
96
- style={authorTextStyle}
97
- testID={COMP_GENERAL_CONSTANTS.secondaryStoryPubishedAt}
98
- >
99
- {getTimeInFormat(story['published-at'], DATE_FORMAT, locale)}
100
- </Text>
101
- </View>
119
+ <Text
120
+ style={authorTextStyle}
121
+ numberOfLines={2}
122
+ // TODO: Add corrected testID here
123
+ >
124
+ {authorName +
125
+ getTimeForStoryCards(
126
+ story["published-at"],
127
+ DATE_FORMAT,
128
+ locale,
129
+ translate
130
+ )}
131
+ </Text>
102
132
  <View style={iconStyles}>{props.iconComponent}</View>
103
133
  </View>
104
134
  </View>
@@ -22,10 +22,7 @@ export const secStoryCardStyles = ({ COLORS, FONT_SIZE, DARK_MODE }) => StyleShe
22
22
  lineHeight: FONT_SIZE.h6 * 1.3,
23
23
  opacity: 0.5,
24
24
  fontWeight: '500',
25
- },
26
- authorTextContainer: {
27
- alignItems: 'center',
28
- flexDirection: 'row',
25
+ paddingTop: 8,
29
26
  },
30
27
  headline: {
31
28
  color: COLORS.BRAND_BLACK,
@@ -51,4 +48,32 @@ export const secStoryCardStyles = ({ COLORS, FONT_SIZE, DARK_MODE }) => StyleShe
51
48
  color: COLORS.BRAND_BLACK,
52
49
  fontSize: FONT_SIZE.h5,
53
50
  },
51
+ storyTypeContainer: {
52
+ position: 'absolute',
53
+ backgroundColor: COLORS.MONO1,
54
+ bottom: 0,
55
+ left: 0,
56
+ },
57
+ storyType: {
58
+ padding: 5,
59
+ justifyContent: 'space-between',
60
+ alignItems: 'center',
61
+ flexDirection: 'row',
62
+ },
63
+ storyTypeText: {
64
+ color: COLORS.MONO7,
65
+ fontSize: FONT_SIZE.h5,
66
+ },
67
+ liveBlogText: {
68
+ color: COLORS.MONO7,
69
+ fontSize: FONT_SIZE.h5,
70
+ marginLeft: 4,
71
+ fontWeight: 'bold',
72
+ },
73
+ liveBlogIcon: {
74
+ height: 12,
75
+ width: 12,
76
+ borderRadius: 50,
77
+ backgroundColor: COLORS.BRAND_3,
78
+ },
54
79
  });
@@ -9,6 +9,7 @@ import {
9
9
  TextStyle,
10
10
  TouchableOpacityProps,
11
11
  } from "react-native";
12
+ import Icon from "react-native-vector-icons/FontAwesome";
12
13
  import {
13
14
  AppTheme,
14
15
  getImageMetadata,
@@ -18,15 +19,16 @@ import {
18
19
  import { getStoryHeadline } from "../../utils/story";
19
20
  import { ResponsiveImage, Text } from "../index";
20
21
  import { storyStyles } from "./styles";
22
+ import { COMP_GENERAL_CONSTANTS } from "../../constants/component-constants/general-constants/constants";
21
23
 
22
24
  const SecondaryStoryCardNewBase = (props) => {
23
25
  const { story = {} } = props;
24
26
  const { theme } = useContext(AppTheme);
25
- const { locale } = theme;
27
+ const { locale, DARK_MODE, COLORS } = theme;
26
28
 
27
29
  const translate = get(theme, ["translate"], (word) => word);
28
30
 
29
- const styles = storyStyles(theme);
31
+ const styles = storyStyles(theme, DARK_MODE);
30
32
  const containerStyle = StyleSheet.flatten([
31
33
  styles.container,
32
34
  { paddingHorizontal: props.horizontalPadding },
@@ -42,13 +44,42 @@ const SecondaryStoryCardNewBase = (props) => {
42
44
 
43
45
  const DATE_FORMAT = "d MMM, yyyy";
44
46
  const readTime = story["read-time"]
45
- ? `${story["read-time"]} ${translate("min read")}`
47
+ ? `${story["read-time"]} ${translate("min read")} · `
46
48
  : "";
47
49
 
48
50
  const throttledOnpress = throttle(props.onPress, 1000);
51
+
52
+ const showIcon = (name) => (
53
+ <View style={styles.storyType}>
54
+ <Icon name={name} size={14} color={COLORS.MONO7} />
55
+ </View>
56
+ );
57
+
58
+ const showLiveBlogIcon = () => (
59
+ <View style={styles.storyType}>
60
+ <View style={styles.liveBlogIcon} />
61
+ <Text style={styles.liveBlogText}>LIVE</Text>
62
+ </View>
63
+ );
64
+
65
+ const showStoryType = () => {
66
+ switch (story["story-template"]) {
67
+ case "text":
68
+ return null;
69
+ case "photo":
70
+ return showIcon("photo");
71
+ case "video":
72
+ return showIcon("play");
73
+ case "live-blog":
74
+ return showLiveBlogIcon();
75
+ default:
76
+ null;
77
+ }
78
+ };
79
+
49
80
  return (
50
81
  <TouchableOpacity
51
- testID={props.collectionTestID}
82
+ testID={COMP_GENERAL_CONSTANTS.secondaryStoryCard}
52
83
  onPress={throttledOnpress}
53
84
  activeOpacity={0.8}
54
85
  style={containerStyle}
@@ -58,25 +89,32 @@ const SecondaryStoryCardNewBase = (props) => {
58
89
  slug={getImageSlug(story) || ""}
59
90
  cdn={props.cdn || ""}
60
91
  imageWidth={props.imageWidth}
61
- />
92
+ >
93
+ <View style={styles.storyTypeContainer}>{showStoryType()}</View>
94
+ </ResponsiveImage>
62
95
  <View style={styles.headlineAndTimestampBlockContainer}>
63
96
  <Text
64
97
  primary
65
98
  numberOfLines={2}
66
99
  ellipsizeMode="tail"
67
100
  style={headlineStyle}
68
- testID="secondaryStoryCardHeadline"
101
+ testID={COMP_GENERAL_CONSTANTS.secondaryStoryHeadline}
69
102
  >
70
103
  {getStoryHeadline(story)?.trim()}
71
104
  </Text>
72
- <View style={styles.timestampContainer}>
73
- {readTime ? (
74
- <Text style={timestampStyle}>{`${readTime} · `}</Text>
75
- ) : null}
76
- <Text style={timestampStyle} testID="secondaryStoryCardDate">
77
- {getTimeForStoryCards(story["published-at"], DATE_FORMAT, locale)}
78
- </Text>
79
- </View>
105
+ <Text
106
+ style={timestampStyle}
107
+ numberOfLines={2}
108
+ // TODO: Add corrected testID here
109
+ >
110
+ {readTime +
111
+ getTimeForStoryCards(
112
+ story["published-at"],
113
+ DATE_FORMAT,
114
+ locale,
115
+ translate
116
+ )}
117
+ </Text>
80
118
  </View>
81
119
  <View style={styles.icon}>{props.iconComponent}</View>
82
120
  </TouchableOpacity>
@@ -18,10 +18,6 @@ export const storyStyles = ({ COLORS, FONT_SIZE }) => StyleSheet.create({
18
18
  fontSize: FONT_SIZE.h5,
19
19
  lineHeight: FONT_SIZE.h5 * 1.2,
20
20
  opacity: 0.6,
21
- },
22
- timestampContainer: {
23
- alignItems: 'center',
24
- flexDirection: 'row',
25
21
  marginTop: 4,
26
22
  },
27
23
  headline: {
@@ -33,4 +29,32 @@ export const storyStyles = ({ COLORS, FONT_SIZE }) => StyleSheet.create({
33
29
  icon: {
34
30
  marginLeft: 8,
35
31
  },
32
+ storyTypeContainer: {
33
+ position: 'absolute',
34
+ backgroundColor: COLORS.MONO1,
35
+ bottom: 0,
36
+ left: 0,
37
+ },
38
+ storyType: {
39
+ padding: 5,
40
+ justifyContent: 'space-between',
41
+ alignItems: 'center',
42
+ flexDirection: 'row',
43
+ },
44
+ storyTypeText: {
45
+ color: COLORS.MONO7,
46
+ fontSize: FONT_SIZE.h5,
47
+ },
48
+ liveBlogText: {
49
+ color: COLORS.MONO7,
50
+ fontSize: FONT_SIZE.h5,
51
+ marginLeft: 4,
52
+ fontWeight: 'bold',
53
+ },
54
+ liveBlogIcon: {
55
+ height: 12,
56
+ width: 12,
57
+ borderRadius: 50,
58
+ backgroundColor: COLORS.BRAND_3,
59
+ },
36
60
  });
@@ -1,27 +1,28 @@
1
- import React, { useContext, memo } from 'react';
2
- import { TouchableOpacity } from 'react-native';
3
- import PropTypes from 'prop-types';
4
- import Icon from 'react-native-vector-icons/Ionicons';
5
- import Share from 'react-native-share';
6
- import { AppTheme } from '../../utils';
7
- import { shareButtonStyles } from './styles';
8
- import { getStoryHeadline } from '../../utils/story';
1
+ import React, { useContext, memo } from "react";
2
+ import { TouchableOpacity } from "react-native";
3
+ import PropTypes from "prop-types";
4
+ import Icon from "react-native-vector-icons/Ionicons";
5
+ import Share from "react-native-share";
6
+ import { AppTheme } from "../../utils";
7
+ import { shareButtonStyles } from "./styles";
8
+ import { getStoryHeadline } from "../../utils/story";
9
+ import { COMP_GENERAL_CONSTANTS } from "../../constants/component-constants";
9
10
 
10
11
  const ShareButtonBase = (props) => {
11
12
  const { theme } = useContext(AppTheme);
12
13
  const styles = shareButtonStyles(theme);
13
- const { story, type = 'story', slug } = props;
14
+ const { story, type = "story", slug } = props;
14
15
 
15
16
  const getShareURL = () => {
16
17
  const { url } = story || {};
17
18
  switch (type) {
18
- case 'story':
19
+ case "story":
19
20
  return url;
20
- case 'card':
21
+ case "card":
21
22
  return `${url}${slug}`;
22
- case 'image':
23
+ case "image":
23
24
  return `${url}${slug}`;
24
- case 'attachment':
25
+ case "attachment":
25
26
  return slug;
26
27
  default:
27
28
  return url || slug;
@@ -43,7 +44,10 @@ const ShareButtonBase = (props) => {
43
44
  }
44
45
 
45
46
  return (
46
- <TouchableOpacity onPress={share}>
47
+ <TouchableOpacity
48
+ onPress={share}
49
+ testID={COMP_GENERAL_CONSTANTS.shareButtonTouch}
50
+ >
47
51
  <Icon style={styles.iconStyle} name="share-social-outline" size={20} />
48
52
  </TouchableOpacity>
49
53
  );
@@ -19,7 +19,7 @@ import { YouTubePlayer } from '../YouTubePlayer';
19
19
  import { storyHeaderStyles } from './styles';
20
20
  import { COMP_CONTENT_CONSTANTS } from '../../constants/component-constants/content-constants/constants';
21
21
 
22
- /* import {DailyMotionPlayer} from "../DailyMotionPlayer"; */
22
+ import { DailyMotionPlayer } from '../DailyMotionPlayer';
23
23
 
24
24
  const DATE_FORMAT = 'd MMMM yyyy h:mm a';
25
25
 
@@ -44,9 +44,9 @@ const getHeroComponent = (props) => {
44
44
  case STORY_TYPES.VIDEO_STORY: {
45
45
  if (!firstVideoElement) return null;
46
46
  switch (firstVideoElement.type) {
47
- /* case "jsembed":{
48
- return <DailyMotionPlayer element={firstVideoElement} />;
49
- } */
47
+ case 'jsembed': {
48
+ return <DailyMotionPlayer element={firstVideoElement} />;
49
+ }
50
50
  case 'youtube-video': {
51
51
  return (
52
52
  <YouTubePlayer
@@ -91,7 +91,7 @@ export const StoryHeader = (props) => {
91
91
  }}
92
92
  />
93
93
  <HTML
94
- html={imgAttribution}
94
+ html={attri}
95
95
  textSelectable={CAN_COPY_TEXT}
96
96
  key={Math.random()}
97
97
  baseFontStyle={styles.attributionStyle}
@@ -37,7 +37,7 @@ export const storyHeaderStyles = (COLORS) => StyleSheet.create({
37
37
  },
38
38
  captionContainerStyle: {
39
39
  paddingHorizontal: 5,
40
- flexDirection: 'row',
40
+ flexDirection: 'column',
41
41
  flexWrap: 'wrap',
42
42
  marginTop: 10,
43
43
  },
@@ -28,7 +28,7 @@ export const StoryImage = ({
28
28
  if (!card['image-attribution']) return null;
29
29
  return (
30
30
  <Text style={styles.attributionText}>
31
- {` | ${card['image-attribution']}`}
31
+ {` | ${stripHTML(card['image-attribution'])}`}
32
32
  </Text>
33
33
  );
34
34
  };
@@ -27,7 +27,7 @@ export const Table = ({ card }) => {
27
27
  <View style={styles.tableRow}>
28
28
  {headerFields.map((headerField) => (
29
29
  <View style={styles.tableHeaderTitle}>
30
- <Text>{data[headerField]}</Text>
30
+ <Text style={styles.tableContect}>{data[headerField]}</Text>
31
31
  </View>
32
32
  ))}
33
33
  </View>
@@ -1,5 +1,4 @@
1
1
  import { StyleSheet } from 'react-native';
2
-
3
2
  export const tableStyles = ({ COLORS }) => StyleSheet.create({
4
3
  container: {
5
4
  flexDirection: 'row',
@@ -15,6 +14,7 @@ export const tableStyles = ({ COLORS }) => StyleSheet.create({
15
14
  justifyContent: 'center',
16
15
  borderWidth: 0.5,
17
16
  borderColor: COLORS.BRAND_4,
17
+ color: COLORS.BRAND_4,
18
18
  },
19
19
  tableBody: {
20
20
  flexDirection: 'column',
@@ -22,4 +22,7 @@ export const tableStyles = ({ COLORS }) => StyleSheet.create({
22
22
  tableRow: {
23
23
  flexDirection: 'row',
24
24
  },
25
- });
25
+ tableContect: {
26
+ color: COLORS.BRAND_BLACK,
27
+ },
28
+ });
@@ -8,13 +8,13 @@ export const textQandAStyles = (COLORS, FONT_SIZE) => StyleSheet.create({
8
8
  fontSize: FONT_SIZE.h2,
9
9
  fontWeight: '600',
10
10
  lineHeight: FONT_SIZE.h2 * 1.3,
11
- color: COLORS.BRAND_8,
12
- opacity: 0.8
11
+ color: COLORS.BRAND_BLACK,
12
+ opacity: 0.8,
13
13
  },
14
14
  answerText: {
15
15
  fontSize: FONT_SIZE.h2,
16
16
  lineHeight: FONT_SIZE.h2 * 1.3,
17
17
  color: COLORS.BRAND_BLACK,
18
- opacity: 0.8
18
+ opacity: 0.8,
19
19
  },
20
20
  });