@citygross/components 0.7.48 → 0.7.49
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.
|
@@ -12,5 +12,6 @@ export declare type TListItem = {
|
|
|
12
12
|
fallBackImage?: string;
|
|
13
13
|
imageAutoHeight?: boolean;
|
|
14
14
|
boldHeader?: boolean;
|
|
15
|
+
smallSkeleton?: boolean;
|
|
15
16
|
};
|
|
16
|
-
export declare function ListItem({ item, loading, fallBackImage, imageAutoHeight, boldHeader, children }: TListItem): JSX.Element;
|
|
17
|
+
export declare function ListItem({ item, loading, fallBackImage, imageAutoHeight, boldHeader, smallSkeleton, children }: TListItem): JSX.Element;
|
|
@@ -16,15 +16,15 @@ var Skeleton__default = /*#__PURE__*/_interopDefaultLegacy(Skeleton);
|
|
|
16
16
|
|
|
17
17
|
function ListItem(_a) {
|
|
18
18
|
var _b;
|
|
19
|
-
var item = _a.item, loading = _a.loading, fallBackImage = _a.fallBackImage, imageAutoHeight = _a.imageAutoHeight, boldHeader = _a.boldHeader, children = _a.children;
|
|
19
|
+
var item = _a.item, loading = _a.loading, fallBackImage = _a.fallBackImage, imageAutoHeight = _a.imageAutoHeight, boldHeader = _a.boldHeader, smallSkeleton = _a.smallSkeleton, children = _a.children;
|
|
20
20
|
return (React__default['default'].createElement(ListItem_styles.ListItemContainer, null,
|
|
21
21
|
React__default['default'].createElement(ListItem_styles.ListLeft, null,
|
|
22
22
|
React__default['default'].createElement(ListItem_styles.ListImageContainer, null,
|
|
23
23
|
React__default['default'].createElement(ListItem_styles.ListImage, { autoHeight: imageAutoHeight, src: (item === null || item === void 0 ? void 0 : item.image) || fallBackImage || fallback_grocery, alt: item === null || item === void 0 ? void 0 : item.name })),
|
|
24
24
|
React__default['default'].createElement(ListItem_styles.ItemInformationContainer, null,
|
|
25
|
-
React__default['default'].createElement(typography.BodyText, { fontWeight: boldHeader ? 'semiBold' : 'regular' }, (item === null || item === void 0 ? void 0 : item.name) || React__default['default'].createElement(Skeleton__default['default'], { width: 250 })),
|
|
25
|
+
React__default['default'].createElement(typography.BodyText, { fontWeight: boldHeader ? 'semiBold' : 'regular' }, (item === null || item === void 0 ? void 0 : item.name) || React__default['default'].createElement(Skeleton__default['default'], { width: smallSkeleton ? 150 : 250 })),
|
|
26
26
|
loading ? (React__default['default'].createElement(typography.BodyText, { size: typography.TextTypes.TextSize.SMALL },
|
|
27
|
-
React__default['default'].createElement(Skeleton__default['default'], { width: 250 }))) : (item === null || item === void 0 ? void 0 : item.description) ? (React__default['default'].createElement(typography.BodyText, { size: typography.TextTypes.TextSize.SMALL, color: (_b = index.theme === null || index.theme === void 0 ? void 0 : index.theme.palette) === null || _b === void 0 ? void 0 : _b.dark }, item === null || item === void 0 ? void 0 : item.description)) : null,
|
|
27
|
+
React__default['default'].createElement(Skeleton__default['default'], { width: smallSkeleton ? 150 : 250 }))) : (item === null || item === void 0 ? void 0 : item.description) ? (React__default['default'].createElement(typography.BodyText, { size: typography.TextTypes.TextSize.SMALL, color: (_b = index.theme === null || index.theme === void 0 ? void 0 : index.theme.palette) === null || _b === void 0 ? void 0 : _b.dark }, item === null || item === void 0 ? void 0 : item.description)) : null,
|
|
28
28
|
(item === null || item === void 0 ? void 0 : item.secondaryDescription) && item.secondaryDescription)),
|
|
29
29
|
children && React__default['default'].createElement(ListItem_styles.ListRight, null, children)));
|
|
30
30
|
}
|
|
@@ -7,15 +7,15 @@ import { theme as theme_1 } from '../../../../design-tokens/build/index.js';
|
|
|
7
7
|
|
|
8
8
|
function ListItem(_a) {
|
|
9
9
|
var _b;
|
|
10
|
-
var item = _a.item, loading = _a.loading, fallBackImage = _a.fallBackImage, imageAutoHeight = _a.imageAutoHeight, boldHeader = _a.boldHeader, children = _a.children;
|
|
10
|
+
var item = _a.item, loading = _a.loading, fallBackImage = _a.fallBackImage, imageAutoHeight = _a.imageAutoHeight, boldHeader = _a.boldHeader, smallSkeleton = _a.smallSkeleton, children = _a.children;
|
|
11
11
|
return (React.createElement(ListItemContainer, null,
|
|
12
12
|
React.createElement(ListLeft, null,
|
|
13
13
|
React.createElement(ListImageContainer, null,
|
|
14
14
|
React.createElement(ListImage, { autoHeight: imageAutoHeight, src: (item === null || item === void 0 ? void 0 : item.image) || fallBackImage || FallbackIcon, alt: item === null || item === void 0 ? void 0 : item.name })),
|
|
15
15
|
React.createElement(ItemInformationContainer, null,
|
|
16
|
-
React.createElement(BodyText, { fontWeight: boldHeader ? 'semiBold' : 'regular' }, (item === null || item === void 0 ? void 0 : item.name) || React.createElement(Skeleton, { width: 250 })),
|
|
16
|
+
React.createElement(BodyText, { fontWeight: boldHeader ? 'semiBold' : 'regular' }, (item === null || item === void 0 ? void 0 : item.name) || React.createElement(Skeleton, { width: smallSkeleton ? 150 : 250 })),
|
|
17
17
|
loading ? (React.createElement(BodyText, { size: TextTypes.TextSize.SMALL },
|
|
18
|
-
React.createElement(Skeleton, { width: 250 }))) : (item === null || item === void 0 ? void 0 : item.description) ? (React.createElement(BodyText, { size: TextTypes.TextSize.SMALL, color: (_b = theme_1 === null || theme_1 === void 0 ? void 0 : theme_1.palette) === null || _b === void 0 ? void 0 : _b.dark }, item === null || item === void 0 ? void 0 : item.description)) : null,
|
|
18
|
+
React.createElement(Skeleton, { width: smallSkeleton ? 150 : 250 }))) : (item === null || item === void 0 ? void 0 : item.description) ? (React.createElement(BodyText, { size: TextTypes.TextSize.SMALL, color: (_b = theme_1 === null || theme_1 === void 0 ? void 0 : theme_1.palette) === null || _b === void 0 ? void 0 : _b.dark }, item === null || item === void 0 ? void 0 : item.description)) : null,
|
|
19
19
|
(item === null || item === void 0 ? void 0 : item.secondaryDescription) && item.secondaryDescription)),
|
|
20
20
|
children && React.createElement(ListRight, null, children)));
|
|
21
21
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.49",
|
|
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": "
|
|
74
|
+
"gitHead": "8540a6ac2431e82b197618060610c25949be0360"
|
|
75
75
|
}
|