@wlloyalty/wll-react-sdk 1.9.0 → 1.10.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.
@@ -1,6 +1,11 @@
1
1
  import React from 'react';
2
+ import { StyleProp, ViewStyle } from 'react-native';
3
+ type ResponsiveViewStyle = StyleProp<ViewStyle> & {
4
+ flexBasis?: string | number;
5
+ };
2
6
  type ContentTileMediaProps = {
3
7
  isArtworkOnly: boolean;
4
8
  };
9
+ export declare const getContentTileMediaContainerStyle: (isArtworkOnly: boolean) => ResponsiveViewStyle;
5
10
  export declare const ContentTileMedia: ({ isArtworkOnly, }: ContentTileMediaProps) => React.ReactElement | null;
6
11
  export {};
package/dist/web.js CHANGED
@@ -20935,6 +20935,14 @@ var useContentTileStyles = function (hasArtwork) {
20935
20935
  });
20936
20936
  };
20937
20937
 
20938
+ var getContentTileMediaContainerStyle = function (isArtworkOnly) {
20939
+ return isArtworkOnly ? {
20940
+ flexBasis: '100%',
20941
+ aspectRatio: 1
20942
+ } : {
20943
+ flexBasis: '50%'
20944
+ };
20945
+ };
20938
20946
  var ContentTileMedia = function (_a) {
20939
20947
  var isArtworkOnly = _a.isArtworkOnly;
20940
20948
  var tileContext = useTileContext();
@@ -20946,11 +20954,7 @@ var ContentTileMedia = function (_a) {
20946
20954
  if (!artworkUrl) return null;
20947
20955
  var hasArtwork = Boolean(artworkUrl);
20948
20956
  var styles = useContentTileStyles(hasArtwork);
20949
- var containerStyle = __assign({
20950
- flexBasis: isArtworkOnly ? '100%' : '50%'
20951
- }, isArtworkOnly && IS_WEB && {
20952
- aspectRatio: 1
20953
- });
20957
+ var containerStyle = getContentTileMediaContainerStyle(isArtworkOnly);
20954
20958
  return /*#__PURE__*/React.createElement(View$2, {
20955
20959
  style: [styles.imageContainer, containerStyle],
20956
20960
  testID: "content-tile-media",