@thecb/components 4.2.8-beta.2 → 4.2.8-beta.5

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/index.cjs.js CHANGED
@@ -21259,7 +21259,9 @@ var Jumbo = function Jumbo(_ref) {
21259
21259
  largeSideSize = _ref$largeSideSize === void 0 ? "2" : _ref$largeSideSize,
21260
21260
  CartStatus = _ref.cartStatus,
21261
21261
  total = _ref.total,
21262
- showCartStatus = _ref.showCartStatus,
21262
+ itemsCount = _ref.itemsCount,
21263
+ _ref$showCartStatus = _ref.showCartStatus,
21264
+ showCartStatus = _ref$showCartStatus === void 0 ? false : _ref$showCartStatus,
21263
21265
  openCartSlider = _ref.openCartSlider;
21264
21266
 
21265
21267
  var _useContext = React.useContext(styled.ThemeContext),
@@ -21282,13 +21284,15 @@ var Jumbo = function Jumbo(_ref) {
21282
21284
  childGap: "0.25rem"
21283
21285
  }, /*#__PURE__*/React__default.createElement(Cluster, {
21284
21286
  minHeight: "100%",
21285
- justify: isMobile ? "center" : showButton || showCartStatus ? "space-between" : "left",
21286
- align: "center"
21287
+ justify: isMobile && !showCartStatus ? "center" : showButton || showCartStatus ? "space-between" : "left",
21288
+ align: "center",
21289
+ nowrap: showCartStatus
21287
21290
  }, /*#__PURE__*/React__default.createElement(Heading$1, {
21288
21291
  variant: isMobile ? "h5" : "h3",
21289
21292
  color: "#ffffff",
21290
21293
  className: "themeJumboHeading",
21291
- themeJumboHeading: true
21294
+ themeJumboHeading: true,
21295
+ extraStyles: showCartStatus && isMobile && "max-width: 60%;"
21292
21296
  }, heading), subHeading && /*#__PURE__*/React__default.createElement(Heading$1, {
21293
21297
  variant: isMobile ? "h6" : "h2",
21294
21298
  color: "#ffffff",
@@ -21300,6 +21304,7 @@ var Jumbo = function Jumbo(_ref) {
21300
21304
  extraStyles: "margin: 0 0 65px 0; min-width: 320px;"
21301
21305
  }), showCartStatus && /*#__PURE__*/React__default.createElement(CartStatus, {
21302
21306
  total: total,
21307
+ itemsCount: itemsCount,
21303
21308
  openCart: openCartSlider
21304
21309
  }))))));
21305
21310
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "4.2.8-beta.2",
3
+ "version": "4.2.8-beta.5",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -17,7 +17,8 @@ const Jumbo = ({
17
17
  largeSideSize = "2",
18
18
  cartStatus: CartStatus,
19
19
  total,
20
- showCartStatus,
20
+ itemsCount,
21
+ showCartStatus = false,
21
22
  openCartSlider
22
23
  }) => {
23
24
  const { isMobile } = useContext(ThemeContext);
@@ -39,19 +40,21 @@ const Jumbo = ({
39
40
  <Cluster
40
41
  minHeight="100%"
41
42
  justify={
42
- isMobile
43
+ isMobile && !showCartStatus
43
44
  ? `center`
44
45
  : showButton || showCartStatus
45
46
  ? `space-between`
46
47
  : `left`
47
48
  }
48
49
  align="center"
50
+ nowrap={showCartStatus}
49
51
  >
50
52
  <Heading
51
53
  variant={isMobile ? "h5" : "h3"}
52
54
  color="#ffffff"
53
55
  className="themeJumboHeading"
54
56
  themeJumboHeading
57
+ extraStyles={showCartStatus && isMobile && `max-width: 60%;`}
55
58
  >
56
59
  {heading}
57
60
  </Heading>
@@ -74,7 +77,11 @@ const Jumbo = ({
74
77
  />
75
78
  )}
76
79
  {showCartStatus && (
77
- <CartStatus total={total} openCart={openCartSlider} />
80
+ <CartStatus
81
+ total={total}
82
+ itemsCount={itemsCount}
83
+ openCart={openCartSlider}
84
+ />
78
85
  )}
79
86
  </Cluster>
80
87
  </Switcher>