@citygross/components 0.7.56 → 0.7.57

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.
@@ -2,5 +2,6 @@ import { TSummaryItem } from '../CartSummary/CartSummary';
2
2
  export declare type TCartItemSummary = {
3
3
  product: TSummaryItem;
4
4
  withParenthesis?: boolean;
5
+ unit?: string;
5
6
  };
6
- export declare function CartItemSummary({ product, withParenthesis }: TCartItemSummary): JSX.Element;
7
+ export declare function CartItemSummary({ product, withParenthesis, unit }: TCartItemSummary): JSX.Element;
@@ -14,7 +14,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
14
  var Skeleton__default = /*#__PURE__*/_interopDefaultLegacy(Skeleton);
15
15
 
16
16
  function CartItemSummary(_a) {
17
- var product = _a.product, withParenthesis = _a.withParenthesis;
17
+ var product = _a.product, withParenthesis = _a.withParenthesis, _b = _a.unit, unit = _b === void 0 ? "st" : _b;
18
18
  return (React__default['default'].createElement(CartItemSummary_styles.CartItemSummaryWrapper, null,
19
19
  product &&
20
20
  (product.amount === 0 || product.amount) &&
@@ -23,7 +23,7 @@ function CartItemSummary(_a) {
23
23
  React__default['default'].createElement(typography.BodyText, { size: typography.TextTypes.TextSize.SMALL, lineThrough: true }, (product === null || product === void 0 ? void 0 : product.cancelledQuantity) ? (product.cancelledQuantity + " st") : (React__default['default'].createElement(Skeleton__default['default'], { width: 100 }))),
24
24
  React__default['default'].createElement(CartItemSummary_styles.AmountText, { lineThrough: true, fontWeight: withParenthesis ? 'regular' : 'semiBold' }, product ? (utils.formatPrice(product.cancelledAmount, withParenthesis)) : (React__default['default'].createElement(Skeleton__default['default'], { width: 100 }))))),
25
25
  React__default['default'].createElement(CartItemSummary_styles.ItemInformationContainer, null,
26
- React__default['default'].createElement(typography.BodyText, { size: typography.TextTypes.TextSize.SMALL }, (product === null || product === void 0 ? void 0 : product.quantity) || (product === null || product === void 0 ? void 0 : product.quantity) === 0 ? (product.quantity + " st") : (React__default['default'].createElement(Skeleton__default['default'], { width: 100 }))),
26
+ React__default['default'].createElement(typography.BodyText, { size: typography.TextTypes.TextSize.SMALL }, (product === null || product === void 0 ? void 0 : product.quantity) || (product === null || product === void 0 ? void 0 : product.quantity) === 0 ? (product.quantity + " " + unit) : (React__default['default'].createElement(Skeleton__default['default'], { width: 100 }))),
27
27
  React__default['default'].createElement(CartItemSummary_styles.AmountText, { fontWeight: withParenthesis ? 'regular' : 'semiBold' }, product ? (utils.formatPrice(product.amount, withParenthesis)) : (React__default['default'].createElement(Skeleton__default['default'], { width: 100 }))))));
28
28
  }
29
29
 
@@ -5,7 +5,7 @@ import Skeleton from 'react-loading-skeleton';
5
5
  import { CartItemSummaryWrapper, CancelledWrapper, AmountText, ItemInformationContainer } from './CartItemSummary.styles.js';
6
6
 
7
7
  function CartItemSummary(_a) {
8
- var product = _a.product, withParenthesis = _a.withParenthesis;
8
+ var product = _a.product, withParenthesis = _a.withParenthesis, _b = _a.unit, unit = _b === void 0 ? "st" : _b;
9
9
  return (React.createElement(CartItemSummaryWrapper, null,
10
10
  product &&
11
11
  (product.amount === 0 || product.amount) &&
@@ -14,7 +14,7 @@ function CartItemSummary(_a) {
14
14
  React.createElement(BodyText, { size: TextTypes.TextSize.SMALL, lineThrough: true }, (product === null || product === void 0 ? void 0 : product.cancelledQuantity) ? (product.cancelledQuantity + " st") : (React.createElement(Skeleton, { width: 100 }))),
15
15
  React.createElement(AmountText, { lineThrough: true, fontWeight: withParenthesis ? 'regular' : 'semiBold' }, product ? (formatPrice(product.cancelledAmount, withParenthesis)) : (React.createElement(Skeleton, { width: 100 }))))),
16
16
  React.createElement(ItemInformationContainer, null,
17
- React.createElement(BodyText, { size: TextTypes.TextSize.SMALL }, (product === null || product === void 0 ? void 0 : product.quantity) || (product === null || product === void 0 ? void 0 : product.quantity) === 0 ? (product.quantity + " st") : (React.createElement(Skeleton, { width: 100 }))),
17
+ React.createElement(BodyText, { size: TextTypes.TextSize.SMALL }, (product === null || product === void 0 ? void 0 : product.quantity) || (product === null || product === void 0 ? void 0 : product.quantity) === 0 ? (product.quantity + " " + unit) : (React.createElement(Skeleton, { width: 100 }))),
18
18
  React.createElement(AmountText, { fontWeight: withParenthesis ? 'regular' : 'semiBold' }, product ? (formatPrice(product.amount, withParenthesis)) : (React.createElement(Skeleton, { width: 100 }))))));
19
19
  }
20
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citygross/components",
3
- "version": "0.7.56",
3
+ "version": "0.7.57",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "./build/cjs/components/src/index.js",
@@ -71,5 +71,5 @@
71
71
  "moment": "^2.29.1",
72
72
  "react-loading-skeleton": "^2.2.0"
73
73
  },
74
- "gitHead": "eb868ac6a471e3b30c14a01d9881379bea0e1d25"
74
+ "gitHead": "87af35d4fbd77545905ee436313ef389ab9d8044"
75
75
  }