@quintype/native-components 2.21.0-beta.3 → 2.21.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.
- package/package.json +1 -1
- package/src/components/AlsoRead/index.js +0 -7
- package/src/components/Html/index.js +3 -1
- package/src/components/PDFReader/styles.js +1 -1
- package/src/components/StoryHeader/index.js +2 -2
- package/src/components/StoryHeader/styles.js +4 -2
- package/src/components/YouTubePlayer/index.js +2 -0
package/package.json
CHANGED
|
@@ -31,13 +31,6 @@ export const AlsoRead = (props) => {
|
|
|
31
31
|
const fallBackIcon = CustomFallBackIcon ? <CustomFallBackIcon /> : <FallbackIcon />;
|
|
32
32
|
|
|
33
33
|
const getImageComponent = () => {
|
|
34
|
-
if (!linkedImage) {
|
|
35
|
-
return (
|
|
36
|
-
<View style={styles.fallBackImageWrapper}>
|
|
37
|
-
{fallBackIcon}
|
|
38
|
-
</View>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
34
|
|
|
42
35
|
return (
|
|
43
36
|
<ResponsiveImage
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { TouchableOpacity, View, I18nManager, StyleSheet, Linking } from "react-native";
|
|
2
2
|
import HTML from "react-native-render-html";
|
|
3
3
|
import React from "react";
|
|
4
|
+
import isHTML from "is-html";
|
|
5
|
+
import { Text } from "@quintype/native-components/src/components/Text";
|
|
4
6
|
|
|
5
7
|
const CustomHtmlParser = ({ text, textStyle={}, containerStyle={} }) => {
|
|
6
8
|
const textStyles = StyleSheet.flatten([
|
|
@@ -9,7 +11,7 @@ const CustomHtmlParser = ({ text, textStyle={}, containerStyle={} }) => {
|
|
|
9
11
|
writingDirection: I18nManager.isRTL ? "rtl" : "ltr",
|
|
10
12
|
},
|
|
11
13
|
]);
|
|
12
|
-
|
|
14
|
+
if(!isHTML(text)) return <Text style={[textStyles, {marginTop:5}]}>{text}</Text>
|
|
13
15
|
return (
|
|
14
16
|
<HTML
|
|
15
17
|
html={text}
|
|
@@ -86,8 +86,8 @@ export const StoryHeader = (props) => {
|
|
|
86
86
|
}
|
|
87
87
|
return (
|
|
88
88
|
<View style={styles.captionContainerStyle}>
|
|
89
|
-
{caption && !firstVideoElement && <CustomHtmlParser text={caption} textStyle={styles.captionStyle}/>}
|
|
90
|
-
{attribution && !firstVideoElement && <CustomHtmlParser text={attribution} textStyle={styles.attributionStyle}/>}
|
|
89
|
+
{caption && !firstVideoElement && <CustomHtmlParser text={caption} textStyle={styles.captionStyle} containerStyle={{marginTop:-6, marginBottom:-15}}/>}
|
|
90
|
+
{attribution && !firstVideoElement && <CustomHtmlParser text={attribution} textStyle={styles.attributionStyle} containerStyle={{marginTop:-6, marginBottom:-10}}/>}
|
|
91
91
|
</View>
|
|
92
92
|
);
|
|
93
93
|
};
|
|
@@ -13,7 +13,7 @@ export const storyHeaderStyles = (COLORS, FONT_FAMILY) => StyleSheet.create({
|
|
|
13
13
|
fontWeight: 'bold',
|
|
14
14
|
},
|
|
15
15
|
dateBlock: {
|
|
16
|
-
marginTop:
|
|
16
|
+
marginTop: 15,
|
|
17
17
|
paddingHorizontal: 10,
|
|
18
18
|
flexDirection: 'row',
|
|
19
19
|
flexWrap: 'wrap',
|
|
@@ -29,14 +29,16 @@ export const storyHeaderStyles = (COLORS, FONT_FAMILY) => StyleSheet.create({
|
|
|
29
29
|
color: COLORS.BRAND_BLACK,
|
|
30
30
|
fontFamily: FONT_FAMILY.secondary,
|
|
31
31
|
opacity: 0.8,
|
|
32
|
+
marginTop:-10
|
|
32
33
|
},
|
|
33
34
|
attributionStyle: {
|
|
34
35
|
color: COLORS.BRAND_BLACK,
|
|
35
36
|
fontFamily: FONT_FAMILY.secondary,
|
|
36
37
|
opacity: 0.8,
|
|
38
|
+
marginBottom:-10
|
|
37
39
|
},
|
|
38
40
|
captionContainerStyle: {
|
|
39
|
-
|
|
41
|
+
paddingHorizontal: 10,
|
|
40
42
|
flexDirection: 'column',
|
|
41
43
|
},
|
|
42
44
|
sectionText: {
|