@quintype/native-components 2.20.0-fix-rtl-issues.2 → 2.20.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 (51) hide show
  1. package/CHANGELOG.md +122 -0
  2. package/package.json +7 -8
  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 +16 -12
  10. package/src/components/BackNavigator/styles.js +2 -0
  11. package/src/components/Button/index.js +13 -9
  12. package/src/components/CollectionCard/index.js +6 -1
  13. package/src/components/CollectionCardNew/index.js +5 -1
  14. package/src/components/CollectionTitleNew/styles.js +0 -1
  15. package/src/components/CustomSwitch/index.js +16 -10
  16. package/src/components/Header/index.js +13 -9
  17. package/src/components/JSEmbedElement/index.js +3 -1
  18. package/src/components/PDFReader/styles.js +1 -0
  19. package/src/components/PrimaryStoryCard/index.js +60 -24
  20. package/src/components/PrimaryStoryCard/styles.js +29 -5
  21. package/src/components/PrimaryStoryCardNew/index.js +74 -29
  22. package/src/components/PrimaryStoryCardNew/styles.js +29 -5
  23. package/src/components/RadioButton/index.js +24 -9
  24. package/src/components/SecondaryStoryCard/index.js +60 -22
  25. package/src/components/SecondaryStoryCard/styles.js +29 -4
  26. package/src/components/SecondaryStoryCardNew/index.js +78 -31
  27. package/src/components/SecondaryStoryCardNew/styles.js +28 -4
  28. package/src/components/ShareButton/index.js +8 -3
  29. package/src/components/SlideshowStoryCard/styles.js +3 -2
  30. package/src/components/Story/index.js +14 -10
  31. package/src/components/StoryHeader/index.js +9 -7
  32. package/src/components/StoryHeader/styles.js +4 -2
  33. package/src/components/StoryImage/index.js +1 -1
  34. package/src/components/StoryImage/styles.js +2 -2
  35. package/src/components/StoryText/styles.js +2 -0
  36. package/src/components/Table/index.js +1 -1
  37. package/src/components/Table/styles.js +5 -2
  38. package/src/components/TextBigFact/index.js +1 -2
  39. package/src/components/TextBigFact/styles.js +3 -0
  40. package/src/components/TextBlockQuote/index.js +5 -4
  41. package/src/components/TextBlockQuote/styles.js +8 -0
  42. package/src/components/TextBlurb/styles.js +2 -0
  43. package/src/components/TextQandA/styles.js +3 -3
  44. package/src/components/TextQuote/styles.js +5 -2
  45. package/src/components/TextSummary/styles.js +2 -0
  46. package/src/components/YouTubePlayer/index.js +1 -0
  47. package/src/constants/component-constants/content-constants/constants.js +7 -5
  48. package/src/constants/component-constants/general-constants/constants.js +25 -14
  49. package/src/constants/renderHTML.js +10 -0
  50. package/src/utils/story.js +7 -3
  51. package/src/utils/timeUtils.js +13 -4
@@ -2,20 +2,21 @@ import { throttle } from 'lodash';
2
2
  import get from 'lodash/get';
3
3
  import PropTypes from 'prop-types';
4
4
  import React, { useContext } from 'react';
5
- import {
6
- StyleSheet, TouchableOpacity, View,
7
- } from 'react-native';
8
-
5
+ import { StyleSheet, TouchableOpacity, View } from 'react-native';
6
+ import Icon from 'react-native-vector-icons/FontAwesome';
9
7
  import {
10
8
  AppTheme,
11
9
  getImageMetadata,
12
10
  getImageSlug,
13
- getTimeInFormat,
11
+ getTimeForStoryCards,
14
12
  } from '../../utils';
15
13
  import { getStoryHeadline } from '../../utils/story';
16
14
  import { ResponsiveImage, Text } from '../index';
17
15
  import { storyStyles } from './styles';
18
- import { COMP_GENERAL_CONSTANTS } from '../../constants/component-constants/general-constants/constants';
16
+ import {
17
+ COMP_GENERAL_CONSTANTS,
18
+ COMP_CONTENT_CONSTANTS,
19
+ } from '../../constants/component-constants';
19
20
 
20
21
  export const PrimaryStoryCard = (props) => {
21
22
  const { story = {} } = props;
@@ -23,7 +24,13 @@ export const PrimaryStoryCard = (props) => {
23
24
 
24
25
  const translate = get(theme, ['translate'], (word) => word);
25
26
 
26
- const { COLORS, FONT_SIZE, locale } = theme || {};
27
+ const {
28
+ COLORS,
29
+ FONT_SIZE,
30
+ locale,
31
+ reverseTimeAdverbPosition,
32
+ enableReadTimeOnStoryCards,
33
+ } = theme || {};
27
34
 
28
35
  const DATE_FORMAT = 'd MMM, yyyy';
29
36
 
@@ -43,10 +50,39 @@ export const PrimaryStoryCard = (props) => {
43
50
 
44
51
  const name = get(story.authors, [0, 'name']);
45
52
  const authorName = name ? `${translate('By')} ${name} | ` : '';
46
- const readTime = story['read-time'] ? `${story['read-time']} ${translate('min read')}` : '';
53
+ const readTime = enableReadTimeOnStoryCards && story['read-time']
54
+ ? `${story['read-time']} ${translate('min read')}`
55
+ : '';
47
56
 
48
57
  const throttledOnpress = throttle(props.onPress, 1000);
49
58
 
59
+ const showIcon = (name) => (
60
+ <View style={styles.storyType}>
61
+ <Icon name={name} size={22} color={COLORS.MONO7} />
62
+ </View>
63
+ );
64
+
65
+ const showLiveBlogIcon = () => (
66
+ <View style={styles.storyType}>
67
+ <View style={styles.liveBlogIcon} />
68
+ <Text style={styles.liveBlogText}>LIVE</Text>
69
+ </View>
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
+
50
86
  return (
51
87
  <TouchableOpacity
52
88
  testID={COMP_GENERAL_CONSTANTS.primaryStoryCard}
@@ -61,29 +97,29 @@ export const PrimaryStoryCard = (props) => {
61
97
  imageWidth={props.imageWidth}
62
98
  >
63
99
  <Text style={styles.xminContainer}>
64
- {' '}
65
100
  {readTime && (
66
101
  <View style={styles.xmin}>
67
102
  <Text style={styles.xminText}>{readTime}</Text>
68
103
  </View>
69
104
  )}
70
105
  </Text>
106
+ <View style={styles.storyTypeContainer}>{showStoryType()}</View>
71
107
  </ResponsiveImage>
72
-
73
- <View style={styles.authorBlockContainer}>
74
- <Text
75
- style={autorStyle}
76
- testID={COMP_GENERAL_CONSTANTS.primaryStoryAuthor}
77
- >
78
- {authorName}
79
- </Text>
80
- <Text
81
- style={autorStyle}
82
- testID={COMP_GENERAL_CONSTANTS.primaryStoryPubishedAt}
83
- >
84
- {getTimeInFormat(story['published-at'], DATE_FORMAT, locale)}
85
- </Text>
86
- </View>
108
+ <Text
109
+ style={autorStyle}
110
+ numberOfLines={2}
111
+ // TODO: Add corrected testID here
112
+ testID={COMP_CONTENT_CONSTANTS.authorName}
113
+ >
114
+ {authorName
115
+ + getTimeForStoryCards(
116
+ story['published-at'],
117
+ DATE_FORMAT,
118
+ locale,
119
+ translate,
120
+ reverseTimeAdverbPosition,
121
+ )}
122
+ </Text>
87
123
  <Text
88
124
  primary
89
125
  numberOfLines={3}
@@ -3,15 +3,11 @@ export const storyStyles = (COLORS = {}, FONT_SIZE = {}, DARK_MODE = {}) => ({
3
3
  backgroundColor: COLORS.BRAND_WHITE,
4
4
  marginTop: 12,
5
5
  },
6
- authorBlockContainer: {
7
- alignItems: 'center',
8
- flexDirection: 'row',
9
- paddingVertical: 8,
10
- },
11
6
  autorText: {
12
7
  color: COLORS?.BRAND_6,
13
8
  fontSize: FONT_SIZE.h5,
14
9
  lineHeight: FONT_SIZE.h5 * 1.3,
10
+ paddingVertical: 8,
15
11
  },
16
12
  divider: {
17
13
  backgroundColor: COLORS.BRAND_6,
@@ -39,4 +35,32 @@ export const storyStyles = (COLORS = {}, FONT_SIZE = {}, DARK_MODE = {}) => ({
39
35
  color: COLORS.BRAND_BLACK,
40
36
  fontSize: FONT_SIZE.h5,
41
37
  },
38
+ storyTypeContainer: {
39
+ position: 'absolute',
40
+ bottom: 0,
41
+ left: 0,
42
+ },
43
+ storyType: {
44
+ backgroundColor: COLORS.MONO1,
45
+ padding: 8,
46
+ justifyContent: 'space-between',
47
+ alignItems: 'space-between',
48
+ flexDirection: 'row',
49
+ },
50
+ storyTypeText: {
51
+ color: COLORS.MONO7,
52
+ fontSize: FONT_SIZE.h5,
53
+ },
54
+ liveBlogText: {
55
+ color: COLORS.MONO7,
56
+ fontSize: FONT_SIZE.h4,
57
+ marginLeft: 10,
58
+ fontWeight: 'bold',
59
+ },
60
+ liveBlogIcon: {
61
+ height: 15,
62
+ width: 15,
63
+ borderRadius: 50,
64
+ backgroundColor: COLORS.BRAND_3,
65
+ },
42
66
  });
@@ -1,27 +1,37 @@
1
- import { get, throttle } from "lodash";
2
- import PropTypes from "prop-types";
3
- import React, { useContext, memo } from "react";
4
- import { I18nManager, StyleSheet, TouchableOpacity, View } from "react-native";
1
+ import { get, throttle } from 'lodash';
2
+ import PropTypes from 'prop-types';
3
+ import React, { useContext, memo } from 'react';
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,
8
9
  getImageSlug,
9
10
  getTimeForStoryCards,
10
- } from "../../utils";
11
- import { getStoryHeadline } from "../../utils/story";
12
- import { ResponsiveImage, Text } from "../index";
13
- import { storyStyles } from "./styles";
14
-
15
-
11
+ } from '../../utils';
12
+ import { getStoryHeadline } from '../../utils/story';
13
+ import { ResponsiveImage, Text } from '../index';
14
+ import { storyStyles } from './styles';
15
+ import {
16
+ COMP_GENERAL_CONSTANTS,
17
+ COMP_CONTENT_CONSTANTS,
18
+ } from '../../constants/component-constants';
16
19
 
17
20
  const PrimaryStoryCardNewBase = (props) => {
18
21
  const { story = {} } = props;
19
22
  const { theme } = useContext(AppTheme);
20
- const { COLORS, FONT_SIZE, locale } = theme || {};
23
+ const {
24
+ COLORS,
25
+ FONT_SIZE,
26
+ locale,
27
+ DARK_MODE,
28
+ reverseTimeAdverbPosition,
29
+ enableReadTimeOnStoryCards,
30
+ } = theme || {};
21
31
 
22
- const translate = get(theme, ["translate"], (word) => word);
32
+ const translate = get(theme, ['translate'], (word) => word);
23
33
 
24
- const styles = storyStyles(COLORS, FONT_SIZE);
34
+ const styles = storyStyles(COLORS, FONT_SIZE, DARK_MODE);
25
35
  const containerStyle = StyleSheet.flatten([
26
36
  styles.container,
27
37
  { paddingHorizontal: props.horizontalPadding },
@@ -35,16 +45,43 @@ const PrimaryStoryCardNewBase = (props) => {
35
45
  props.timestampStyle,
36
46
  ]);
37
47
 
38
- const DATE_FORMAT = "d MMM, yyyy";
39
- const readTime = story["read-time"]
40
- ? `${story["read-time"]} ${translate("min read")}`
41
- : "";
48
+ const DATE_FORMAT = 'd MMM, yyyy';
49
+ const readTime = enableReadTimeOnStoryCards && story['read-time']
50
+ ? `${story['read-time']} ${translate('min read')} · `
51
+ : '';
42
52
 
43
53
  const throttledOnpress = throttle(props.onPress, 1000);
44
54
 
55
+ const showIcon = (name) => (
56
+ <View style={styles.storyType}>
57
+ <Icon name={name} size={22} color={COLORS.MONO7} />
58
+ </View>
59
+ );
60
+
61
+ const showLiveBlogIcon = () => (
62
+ <View style={styles.storyType}>
63
+ <View style={styles.liveBlogIcon} />
64
+ <Text style={styles.liveBlogText}>LIVE</Text>
65
+ </View>
66
+ );
67
+ const showStoryType = () => {
68
+ switch (story['story-template']) {
69
+ case 'text':
70
+ return null;
71
+ case 'photo':
72
+ return showIcon('photo');
73
+ case 'video':
74
+ return showIcon('play');
75
+ case 'live-blog':
76
+ return showLiveBlogIcon();
77
+ default:
78
+ null;
79
+ }
80
+ };
81
+
45
82
  return (
46
83
  <TouchableOpacity
47
- testID="primaryStoryCardView"
84
+ testID={COMP_GENERAL_CONSTANTS.primaryStoryCard}
48
85
  onPress={throttledOnpress}
49
86
  activeOpacity={0.8}
50
87
  style={containerStyle}
@@ -54,7 +91,9 @@ const PrimaryStoryCardNewBase = (props) => {
54
91
  slug={getImageSlug(story)}
55
92
  cdn={props.cdn}
56
93
  imageWidth={props.imageWidth}
57
- />
94
+ >
95
+ <View style={styles.storyTypeContainer}>{showStoryType()}</View>
96
+ </ResponsiveImage>
58
97
  <View style={styles.contentContainer}>
59
98
  <View style={styles.headlineAndTimestampContainer}>
60
99
  <Text
@@ -62,18 +101,24 @@ const PrimaryStoryCardNewBase = (props) => {
62
101
  numberOfLines={3}
63
102
  ellipsizeMode="tail"
64
103
  style={headlineStyle}
65
- testID="primaryStoryCardHeadline"
104
+ testID={COMP_GENERAL_CONSTANTS.primaryStoryHeadline}
66
105
  >
67
106
  {getStoryHeadline(story)}
68
107
  </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>
108
+ <Text
109
+ style={timestampStyle}
110
+ numberOfLines={2}
111
+ testID={COMP_CONTENT_CONSTANTS.publishedDate}
112
+ >
113
+ {readTime
114
+ + getTimeForStoryCards(
115
+ story['published-at'],
116
+ DATE_FORMAT,
117
+ locale,
118
+ translate,
119
+ reverseTimeAdverbPosition,
120
+ )}
121
+ </Text>
77
122
  </View>
78
123
  <View style={styles.icon}>{props.iconComponent}</View>
79
124
  </View>
@@ -93,7 +138,7 @@ PrimaryStoryCardNewBase.propTypes = {
93
138
  };
94
139
 
95
140
  PrimaryStoryCardNewBase.defaultProps = {
96
- cdn: "",
141
+ cdn: '',
97
142
  horizontalPadding: 12,
98
143
  };
99
144
 
@@ -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,22 +10,31 @@ 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';
21
22
  import { secStoryCardStyles } from './styles';
22
- import { COMP_GENERAL_CONSTANTS } from '../../constants/component-constants/general-constants/constants';
23
+ import {
24
+ COMP_GENERAL_CONSTANTS,
25
+ COMP_CONTENT_CONSTANTS,
26
+ } from '../../constants/component-constants';
23
27
 
24
28
  export const SecondaryStoryCard = (props) => {
25
29
  const { theme } = useContext(AppTheme);
26
30
  const translate = get(theme, ['translate'], (word) => word);
27
31
 
28
- const { locale } = theme;
32
+ const {
33
+ locale,
34
+ COLORS,
35
+ reverseTimeAdverbPosition,
36
+ enableReadTimeOnStoryCards,
37
+ } = theme;
29
38
  const styles = secStoryCardStyles(theme);
30
39
  const { story = {} } = props;
31
40
 
@@ -44,15 +53,43 @@ export const SecondaryStoryCard = (props) => {
44
53
  props.dateTextStyle,
45
54
  ]);
46
55
  const iconStyles = StyleSheet.flatten([styles.iconStyles, props.iconStyle]);
47
- const authorTextContainerStyle = StyleSheet.flatten([
48
- styles.authorTextContainer,
49
- props.authorTextContainer,
50
- ]);
56
+
51
57
  const name = get(story.authors, [0, 'name']);
52
58
  const authorName = name ? `${translate('By')} ${name} | ` : '';
53
- const readTime = story['read-time'] ? `${story['read-time']} ${translate('min read')}` : '';
59
+ const readTime = enableReadTimeOnStoryCards && story['read-time']
60
+ ? `${story['read-time']} ${translate('min read')}`
61
+ : '';
54
62
 
55
63
  const throttledOnpress = throttle(props.onPress, 1000);
64
+
65
+ const showIcon = (name) => (
66
+ <View style={styles.storyType}>
67
+ <Icon name={name} size={14} color={COLORS.MONO7} />
68
+ </View>
69
+ );
70
+
71
+ const showLiveBlogIcon = () => (
72
+ <View style={styles.storyType}>
73
+ <View style={styles.liveBlogIcon} />
74
+ <Text style={styles.liveBlogText}>LIVE</Text>
75
+ </View>
76
+ );
77
+
78
+ const showStoryType = () => {
79
+ switch (story['story-template']) {
80
+ case 'text':
81
+ return null;
82
+ case 'photo':
83
+ return showIcon('photo');
84
+ case 'video':
85
+ return showIcon('play');
86
+ case 'live-blog':
87
+ return showLiveBlogIcon();
88
+ default:
89
+ null;
90
+ }
91
+ };
92
+
56
93
  return (
57
94
  <TouchableOpacity
58
95
  testID={COMP_GENERAL_CONSTANTS.secondaryStoryCard}
@@ -73,6 +110,7 @@ export const SecondaryStoryCard = (props) => {
73
110
  </View>
74
111
  )}
75
112
  </Text>
113
+ <View style={styles.storyTypeContainer}>{showStoryType()}</View>
76
114
  </ResponsiveImage>
77
115
  <View style={styles.headlineAndAuthorBlockContainer}>
78
116
  <Text
@@ -85,20 +123,20 @@ export const SecondaryStoryCard = (props) => {
85
123
  {getStoryHeadline(story)?.trim()}
86
124
  </Text>
87
125
  <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>
126
+ <Text
127
+ style={authorTextStyle}
128
+ numberOfLines={2}
129
+ testID={COMP_CONTENT_CONSTANTS.authorName}
130
+ >
131
+ {authorName
132
+ + getTimeForStoryCards(
133
+ story['published-at'],
134
+ DATE_FORMAT,
135
+ locale,
136
+ translate,
137
+ reverseTimeAdverbPosition,
138
+ )}
139
+ </Text>
102
140
  <View style={iconStyles}>{props.iconComponent}</View>
103
141
  </View>
104
142
  </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
  });