trepur_components 0.3.16 → 0.3.17
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.
|
@@ -61,7 +61,8 @@ const textAndTitleProps = {
|
|
|
61
61
|
withLiveUpdates: _propTypes.default.bool,
|
|
62
62
|
onSave: _propTypes.default.func,
|
|
63
63
|
saveButtonProps: _propTypes.default.object,
|
|
64
|
-
cancelButtonProps: _propTypes.default.object
|
|
64
|
+
cancelButtonProps: _propTypes.default.object,
|
|
65
|
+
isHorizontal: _propTypes.default.bool
|
|
65
66
|
};
|
|
66
67
|
exports.textAndTitleProps = textAndTitleProps;
|
|
67
68
|
|
|
@@ -158,6 +159,15 @@ const TextAndTitle = _ref => {
|
|
|
158
159
|
(textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : textAndTitleProps.withLiveUpdates) && setIsHovering(!isHovering);
|
|
159
160
|
};
|
|
160
161
|
|
|
162
|
+
const wrapperClassList = (0, _classnames.default)({
|
|
163
|
+
'flex flex-wrap md:items-center': textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : textAndTitleProps.isHorizontal
|
|
164
|
+
}, 'border');
|
|
165
|
+
const titleWrapperClassList = (0, _classnames.default)({
|
|
166
|
+
'md:w-1/2 md:text-center': textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : textAndTitleProps.isHorizontal
|
|
167
|
+
});
|
|
168
|
+
const textWrapperClassList = (0, _classnames.default)({
|
|
169
|
+
'md:w-1/2 md:text-center md:py-8 md:pr-8': textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : textAndTitleProps.isHorizontal
|
|
170
|
+
});
|
|
161
171
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, (textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : textAndTitleProps.id) && {
|
|
162
172
|
id: textAndTitleProps.id
|
|
163
173
|
}, {
|
|
@@ -226,16 +236,21 @@ const TextAndTitle = _ref => {
|
|
|
226
236
|
hoverBgColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca8 = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca8 === void 0 ? void 0 : _textAndTitleProps$ca8.hoverBgColor
|
|
227
237
|
}
|
|
228
238
|
})) : /*#__PURE__*/_react.default.createElement("div", {
|
|
239
|
+
className: wrapperClassList,
|
|
229
240
|
onClick: toggleEditState
|
|
241
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
242
|
+
className: titleWrapperClassList
|
|
230
243
|
}, /*#__PURE__*/_react.default.createElement("h1", {
|
|
231
244
|
className: titleClassList
|
|
232
|
-
}, componentData.title.text), /*#__PURE__*/_react.default.createElement("
|
|
245
|
+
}, componentData.title.text)), /*#__PURE__*/_react.default.createElement("div", {
|
|
246
|
+
className: textWrapperClassList
|
|
247
|
+
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
233
248
|
className: textClassList
|
|
234
249
|
}, componentData.textLineOne.text), /*#__PURE__*/_react.default.createElement("p", {
|
|
235
250
|
className: textClassList
|
|
236
251
|
}, componentData.textLineTwo.text), /*#__PURE__*/_react.default.createElement("p", {
|
|
237
252
|
className: textClassList
|
|
238
|
-
}, componentData.textLineThree.text)));
|
|
253
|
+
}, componentData.textLineThree.text))));
|
|
239
254
|
};
|
|
240
255
|
|
|
241
256
|
TextAndTitle.propTypes = {
|