@wlloyalty/wll-react-sdk 1.0.78 → 1.0.79
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/dist/native.js +7 -1
- package/dist/native.js.map +1 -1
- package/dist/web.js +13 -5
- package/dist/web.js.map +1 -1
- package/package.json +1 -1
package/dist/native.js
CHANGED
|
@@ -3656,9 +3656,11 @@ var Grid = function (_a) {
|
|
|
3656
3656
|
};
|
|
3657
3657
|
}
|
|
3658
3658
|
else {
|
|
3659
|
+
// For mobile, we need to be very precise with our calculations
|
|
3659
3660
|
var horizontalPadding = GRID_GAP;
|
|
3660
3661
|
var availableWidth = SCREEN_WIDTH - horizontalPadding * 2;
|
|
3661
|
-
var
|
|
3662
|
+
var gapSpace = (columns - 1) * GRID_GAP;
|
|
3663
|
+
var tileWidth = Math.floor((availableWidth - gapSpace) / columns);
|
|
3662
3664
|
return {
|
|
3663
3665
|
width: tileWidth,
|
|
3664
3666
|
marginBottom: GRID_GAP,
|
|
@@ -3699,6 +3701,7 @@ var Grid = function (_a) {
|
|
|
3699
3701
|
// @ts-ignore Web uses CSS calc strings for responsive layouts, while ViewStyle expects numbers
|
|
3700
3702
|
getTileWidth(columnsPerRow),
|
|
3701
3703
|
!isLastInRow && { marginRight: GRID_GAP },
|
|
3704
|
+
{ overflow: 'hidden' }, // Prevent content from overflowing
|
|
3702
3705
|
], children: jsxRuntimeExports.jsx(TileContainer, { tiles: currentTiles }) }, "container-".concat(index)));
|
|
3703
3706
|
currentTiles = [];
|
|
3704
3707
|
}
|
|
@@ -3712,6 +3715,7 @@ var styles$2 = reactNative.StyleSheet.create({
|
|
|
3712
3715
|
flexDirection: 'row',
|
|
3713
3716
|
flexWrap: 'wrap',
|
|
3714
3717
|
width: '100%',
|
|
3718
|
+
justifyContent: 'space-between', // Ensure tiles are evenly spaced
|
|
3715
3719
|
},
|
|
3716
3720
|
});
|
|
3717
3721
|
|
|
@@ -4658,10 +4662,12 @@ var styles = reactNative.StyleSheet.create({
|
|
|
4658
4662
|
flexDirection: 'column',
|
|
4659
4663
|
flex: 1,
|
|
4660
4664
|
aspectRatio: 1,
|
|
4665
|
+
width: '100%', // Ensure the container takes full width
|
|
4661
4666
|
},
|
|
4662
4667
|
tileContainer: {
|
|
4663
4668
|
flex: 1,
|
|
4664
4669
|
aspectRatio: 1,
|
|
4670
|
+
width: '100%', // Ensure each tile takes full width of its container
|
|
4665
4671
|
},
|
|
4666
4672
|
halfTileContainer: {
|
|
4667
4673
|
flex: 0.5,
|