@citygross/components 0.8.77 → 0.8.78
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.
|
@@ -14,5 +14,6 @@ export declare type TCartCard = {
|
|
|
14
14
|
onDelete?: () => void;
|
|
15
15
|
quanitytSelector?: React.ReactNode;
|
|
16
16
|
titleLineClamp?: number;
|
|
17
|
+
titleLink?: React.ReactNode;
|
|
17
18
|
};
|
|
18
|
-
export declare const CartCard: ({ markings, title, description, showDelete, maxReachedWarning, value, price, image, onDelete, maxValue, secondaryDescription, quanitytSelector, titleLineClamp }: TCartCard) => JSX.Element;
|
|
19
|
+
export declare const CartCard: ({ markings, title, description, showDelete, maxReachedWarning, value, price, image, titleLink, onDelete, maxValue, secondaryDescription, quanitytSelector, titleLineClamp, }: TCartCard) => JSX.Element;
|
|
@@ -13,14 +13,14 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
13
13
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
14
14
|
|
|
15
15
|
var CartCard = function (_a) {
|
|
16
|
-
var markings = _a.markings, title = _a.title, description = _a.description, showDelete = _a.showDelete, maxReachedWarning = _a.maxReachedWarning, value = _a.value, price = _a.price, image = _a.image, onDelete = _a.onDelete, _b = _a.maxValue, maxValue = _b === void 0 ? 999 : _b, secondaryDescription = _a.secondaryDescription, quanitytSelector = _a.quanitytSelector, _c = _a.titleLineClamp, titleLineClamp = _c === void 0 ? 1 : _c;
|
|
16
|
+
var markings = _a.markings, title = _a.title, description = _a.description, showDelete = _a.showDelete, maxReachedWarning = _a.maxReachedWarning, value = _a.value, price = _a.price, image = _a.image, titleLink = _a.titleLink, onDelete = _a.onDelete, _b = _a.maxValue, maxValue = _b === void 0 ? 999 : _b, secondaryDescription = _a.secondaryDescription, quanitytSelector = _a.quanitytSelector, _c = _a.titleLineClamp, titleLineClamp = _c === void 0 ? 1 : _c;
|
|
17
17
|
return (React__default["default"].createElement(CartCard_styles.CartCardContainer, null,
|
|
18
18
|
React__default["default"].createElement(CartCard_styles.CartCardImage, { src: image || fallback_grocery }),
|
|
19
19
|
React__default["default"].createElement(CartCard_styles.CartCardInner, null,
|
|
20
20
|
React__default["default"].createElement(CartCard_styles.CartCardInnerTop, null,
|
|
21
21
|
React__default["default"].createElement(CartCard_styles.CartCardInfo, null,
|
|
22
22
|
markings && (React__default["default"].createElement(CartCard_styles.MarkingsContainer, null, markings)),
|
|
23
|
-
title && (React__default["default"].createElement(CartCard_styles.CartCardTitle, { titleLineClamp: titleLineClamp }, title)),
|
|
23
|
+
titleLink || title && (React__default["default"].createElement(CartCard_styles.CartCardTitle, { titleLineClamp: titleLineClamp }, title)),
|
|
24
24
|
description && description),
|
|
25
25
|
showDelete && (React__default["default"].createElement(CartCard_styles.CartCardDelete, null,
|
|
26
26
|
React__default["default"].createElement(CgButton.CgButton, { onClick: onDelete, variant: CgButton.EButtonVariant.secondary, icon: React__default["default"].createElement(icons.Icons.Trash, { width: 16, height: 16 }) })))),
|
|
@@ -5,14 +5,14 @@ import { Icons } from '@citygross/icons';
|
|
|
5
5
|
import { CgButton, EButtonVariant } from '../CgButton/CgButton.js';
|
|
6
6
|
|
|
7
7
|
var CartCard = function (_a) {
|
|
8
|
-
var markings = _a.markings, title = _a.title, description = _a.description, showDelete = _a.showDelete, maxReachedWarning = _a.maxReachedWarning, value = _a.value, price = _a.price, image = _a.image, onDelete = _a.onDelete, _b = _a.maxValue, maxValue = _b === void 0 ? 999 : _b, secondaryDescription = _a.secondaryDescription, quanitytSelector = _a.quanitytSelector, _c = _a.titleLineClamp, titleLineClamp = _c === void 0 ? 1 : _c;
|
|
8
|
+
var markings = _a.markings, title = _a.title, description = _a.description, showDelete = _a.showDelete, maxReachedWarning = _a.maxReachedWarning, value = _a.value, price = _a.price, image = _a.image, titleLink = _a.titleLink, onDelete = _a.onDelete, _b = _a.maxValue, maxValue = _b === void 0 ? 999 : _b, secondaryDescription = _a.secondaryDescription, quanitytSelector = _a.quanitytSelector, _c = _a.titleLineClamp, titleLineClamp = _c === void 0 ? 1 : _c;
|
|
9
9
|
return (React.createElement(CartCardContainer, null,
|
|
10
10
|
React.createElement(CartCardImage, { src: image || FallbackIcon }),
|
|
11
11
|
React.createElement(CartCardInner, null,
|
|
12
12
|
React.createElement(CartCardInnerTop, null,
|
|
13
13
|
React.createElement(CartCardInfo, null,
|
|
14
14
|
markings && (React.createElement(MarkingsContainer, null, markings)),
|
|
15
|
-
title && (React.createElement(CartCardTitle, { titleLineClamp: titleLineClamp }, title)),
|
|
15
|
+
titleLink || title && (React.createElement(CartCardTitle, { titleLineClamp: titleLineClamp }, title)),
|
|
16
16
|
description && description),
|
|
17
17
|
showDelete && (React.createElement(CartCardDelete, null,
|
|
18
18
|
React.createElement(CgButton, { onClick: onDelete, variant: EButtonVariant.secondary, icon: React.createElement(Icons.Trash, { width: 16, height: 16 }) })))),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.78",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./build/cjs/components/src/index.js",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"react-slick": "^0.30.1",
|
|
77
77
|
"slick-carousel": "^1.8.1"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "9f24dab92a2ab9367e8833fdbbc0555dde4b04e0"
|
|
80
80
|
}
|