@quintype/native-components 2.22.1 → 2.22.3
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
CHANGED
|
@@ -41,7 +41,7 @@ const CollectionCardNewBase = ({
|
|
|
41
41
|
}}
|
|
42
42
|
cdn={cdn}
|
|
43
43
|
story={!isEmpty(stories) ? primaryStory : {}}
|
|
44
|
-
iconComponent={<ShareButton story={primaryStory} />}
|
|
44
|
+
iconComponent={<ShareButton story={primaryStory} inListingStoryCard />}
|
|
45
45
|
imageWidth={getScreenPercentageWidth(100) - 2 * horizontalPadding}
|
|
46
46
|
horizontalPadding={horizontalPadding}
|
|
47
47
|
/>
|
|
@@ -54,7 +54,7 @@ const CollectionCardNewBase = ({
|
|
|
54
54
|
key={secondaryStory?.id}
|
|
55
55
|
cdn={cdn}
|
|
56
56
|
story={secondaryStory}
|
|
57
|
-
iconComponent={<ShareButton story={secondaryStory} />}
|
|
57
|
+
iconComponent={<ShareButton story={secondaryStory} inListingStoryCard />}
|
|
58
58
|
imageWidth={getScreenPercentageWidth(29)}
|
|
59
59
|
horizontalPadding={horizontalPadding}
|
|
60
60
|
/>
|
|
@@ -44,7 +44,7 @@ export const RelatedStoriesCard = ({
|
|
|
44
44
|
return switchToNewDesign ? (
|
|
45
45
|
<SecondaryStoryCardNew
|
|
46
46
|
{...storyCardProps}
|
|
47
|
-
iconComponent={<ShareButton story={secondaryStory} />}
|
|
47
|
+
iconComponent={<ShareButton story={secondaryStory} inListingStoryCard />}
|
|
48
48
|
imageWidth={getScreenPercentageWidth(25)}
|
|
49
49
|
horizontalPadding={4}
|
|
50
50
|
/>
|
|
@@ -13,7 +13,7 @@ const ShareButtonBase = (props) => {
|
|
|
13
13
|
const { theme } = useContext(AppTheme);
|
|
14
14
|
const styles = shareButtonStyles(theme);
|
|
15
15
|
const { storyCardOptions = {} } = theme;
|
|
16
|
-
const { story, type = 'story', slug, containerStyle } = props;
|
|
16
|
+
const { story, type = 'story', slug, containerStyle, inListingStoryCard = false } = props;
|
|
17
17
|
|
|
18
18
|
const getShareURL = () => {
|
|
19
19
|
const { url } = story || {};
|
|
@@ -38,7 +38,7 @@ const ShareButtonBase = (props) => {
|
|
|
38
38
|
message: `${getStoryHeadline(story)} | ${shareURL}`,
|
|
39
39
|
title: getStoryHeadline(story),
|
|
40
40
|
})
|
|
41
|
-
.then(() => {})
|
|
41
|
+
.then(() => { })
|
|
42
42
|
.catch((err) => {
|
|
43
43
|
err && console.log(err);
|
|
44
44
|
});
|
|
@@ -61,7 +61,7 @@ const ShareButtonBase = (props) => {
|
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
return storyCardOptions.enableShareButton ? (
|
|
64
|
+
return inListingStoryCard && !storyCardOptions.enableShareButton ? null : (
|
|
65
65
|
<TouchableOpacity
|
|
66
66
|
onPress={share}
|
|
67
67
|
testID={COMP_GENERAL_CONSTANTS.shareButtonTouch}
|
|
@@ -69,7 +69,7 @@ const ShareButtonBase = (props) => {
|
|
|
69
69
|
>
|
|
70
70
|
{renderIcon()}
|
|
71
71
|
</TouchableOpacity>
|
|
72
|
-
)
|
|
72
|
+
);
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
ShareButtonBase.propTypes = {
|