pcm-shared-components 2.0.4 → 2.0.6
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.
|
@@ -42,7 +42,7 @@ const useStyles = makeStyles(theme => ({
|
|
|
42
42
|
paddingRight: ({
|
|
43
43
|
hasImage,
|
|
44
44
|
isTierPricing
|
|
45
|
-
}) => hasImage && isTierPricing ?
|
|
45
|
+
}) => hasImage && isTierPricing ? 2 : undefined,
|
|
46
46
|
textAlign: 'center',
|
|
47
47
|
fontSize: 16,
|
|
48
48
|
borderRadius: 5,
|
|
@@ -62,7 +62,7 @@ const useStyles = makeStyles(theme => ({
|
|
|
62
62
|
paddingRight: ({
|
|
63
63
|
hasImage,
|
|
64
64
|
isTierPricing
|
|
65
|
-
}) => hasImage && isTierPricing ?
|
|
65
|
+
}) => hasImage && isTierPricing ? 2 : undefined,
|
|
66
66
|
textAlign: 'center',
|
|
67
67
|
borderRadius: 5,
|
|
68
68
|
backgroundColor: theme.palette && theme.palette.action.focus ? theme.palette.action.focus : undefined,
|
|
@@ -157,7 +157,7 @@ export const ProductItemButton = props => {
|
|
|
157
157
|
PRODUCT_BUTTON_HEIGHT,
|
|
158
158
|
PRODUCT_SMALL_BUTTON_WIDTH,
|
|
159
159
|
PRODUCT_LARGE_BUTTON_WIDTH,
|
|
160
|
-
hasImage: productData.
|
|
160
|
+
hasImage: productData.picturesFullURL && productData.picturesFullURL.length > 0 ? true : false,
|
|
161
161
|
isTierPricing: Number(productData.is_unit_pricing) !== 1 ? true : false
|
|
162
162
|
});
|
|
163
163
|
const compTheme = theme ? theme : useTheme();
|
|
@@ -242,13 +242,13 @@ export const ProductItemButton = props => {
|
|
|
242
242
|
arrow: true
|
|
243
243
|
}, /*#__PURE__*/React.createElement(InfoIcon, {
|
|
244
244
|
fontSize: "normal"
|
|
245
|
-
})))), productData.
|
|
245
|
+
})))), productData.picturesFullURL && productData.picturesFullURL.length > 0 && /*#__PURE__*/React.createElement("div", {
|
|
246
246
|
className: "absolute left-0 -ml-10 z-99",
|
|
247
247
|
style: {
|
|
248
248
|
top: '22%'
|
|
249
249
|
}
|
|
250
250
|
}, /*#__PURE__*/React.createElement(ImageStack, {
|
|
251
|
-
images: productData.
|
|
251
|
+
images: productData.picturesFullURL,
|
|
252
252
|
imageSize: 50,
|
|
253
253
|
orientation: "vertical"
|
|
254
254
|
})), /*#__PURE__*/React.createElement("div", {
|
|
@@ -264,7 +264,7 @@ export const ProductItemButton = props => {
|
|
|
264
264
|
/*#__PURE__*/
|
|
265
265
|
// Tire Pricing
|
|
266
266
|
React.createElement("div", {
|
|
267
|
-
className: `flex flex-row justify-end mx-auto mb-4 capitalize ${productData.
|
|
267
|
+
className: `flex flex-row justify-end mx-auto mb-4 capitalize ${productData.picturesFullURL && productData.picturesFullURL.length > 0 ? ' ml-32 ' : ''}`
|
|
268
268
|
}, /*#__PURE__*/React.createElement(TierPricing, {
|
|
269
269
|
price: productData.daily_price,
|
|
270
270
|
sub_title: i18next.t('common.app.nightly')
|
|
@@ -327,6 +327,7 @@ ProductItemButton.defaultProps = {
|
|
|
327
327
|
monthly_price: "0",
|
|
328
328
|
seasonal_price: "0",
|
|
329
329
|
pictures: [],
|
|
330
|
+
picturesFullURL: [],
|
|
330
331
|
discount_type_id: "0",
|
|
331
332
|
discount_type_amount: "0",
|
|
332
333
|
discount_total: "0",
|