@thecb/components 6.3.1-beta.5 → 6.3.1-beta.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.
- package/dist/index.cjs.js +10 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +10 -8
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/card/Card.js +13 -11
- package/src/components/atoms/card/CardText.js +18 -14
package/dist/index.cjs.js
CHANGED
|
@@ -35165,18 +35165,21 @@ var fallbackValues$x = _defineProperty({
|
|
|
35165
35165
|
}, "titleWeight", titleWeight);
|
|
35166
35166
|
|
|
35167
35167
|
var CardText = function CardText(_ref) {
|
|
35168
|
-
var
|
|
35168
|
+
var padding = _ref.padding,
|
|
35169
|
+
text = _ref.text,
|
|
35169
35170
|
titleText = _ref.titleText,
|
|
35170
35171
|
_ref$titleVariant = _ref.titleVariant,
|
|
35171
35172
|
titleVariant = _ref$titleVariant === void 0 ? "small" : _ref$titleVariant,
|
|
35172
35173
|
themeValues = _ref.themeValues;
|
|
35173
|
-
return /*#__PURE__*/React__default.createElement(
|
|
35174
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
35175
|
+
padding: padding
|
|
35176
|
+
}, titleText && /*#__PURE__*/React__default.createElement(Title$1, {
|
|
35174
35177
|
variant: titleVariant,
|
|
35175
35178
|
color: themeValues.titleColor,
|
|
35176
35179
|
weight: themeValues === null || themeValues === void 0 ? void 0 : themeValues.titleWeight
|
|
35177
35180
|
}, titleText), /*#__PURE__*/React__default.createElement(Paragraph$1, {
|
|
35178
35181
|
color: themeValues.textColor
|
|
35179
|
-
}, text))
|
|
35182
|
+
}, text));
|
|
35180
35183
|
};
|
|
35181
35184
|
var CardText$1 = themeComponent(withWindowSize(CardText), "CardText", fallbackValues$x);
|
|
35182
35185
|
|
|
@@ -35219,7 +35222,7 @@ var Card = function Card(_ref) {
|
|
|
35219
35222
|
borderRadius = _ref$borderRadius === void 0 ? "4px" : _ref$borderRadius,
|
|
35220
35223
|
_ref$padding = _ref.padding,
|
|
35221
35224
|
padding = _ref$padding === void 0 ? "24px" : _ref$padding;
|
|
35222
|
-
var numberOfChildren = children.length + (
|
|
35225
|
+
var numberOfChildren = (typeof children === "Array" ? children.length : 1) + (text ? 1 : 0) + (imgSrc ? 1 : 0) + (headerText ? 1 : 0);
|
|
35223
35226
|
return /*#__PURE__*/React__default.createElement(BoxWithShadow$1, {
|
|
35224
35227
|
variant: "baseStandard",
|
|
35225
35228
|
background: themeValues.backgroundColor,
|
|
@@ -35246,13 +35249,12 @@ var Card = function Card(_ref) {
|
|
|
35246
35249
|
objectFit: imgObjectFit,
|
|
35247
35250
|
backgroundColor: themeValues.imageBackgroundColor,
|
|
35248
35251
|
src: imgSrc
|
|
35249
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
35250
|
-
padding: padding
|
|
35251
|
-
}, text && /*#__PURE__*/React__default.createElement(CardText$1, {
|
|
35252
|
+
}), text && /*#__PURE__*/React__default.createElement(CardText$1, {
|
|
35253
|
+
padding: padding,
|
|
35252
35254
|
titleText: titleText,
|
|
35253
35255
|
text: text,
|
|
35254
35256
|
titleVariant: titleVariant
|
|
35255
|
-
}), children)))
|
|
35257
|
+
}), children)));
|
|
35256
35258
|
};
|
|
35257
35259
|
|
|
35258
35260
|
var Card$1 = themeComponent(withWindowSize(Card), "Card", fallbackValues$w);
|