@gravity-ui/page-constructor 4.35.0 → 4.35.1
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.
|
@@ -118,14 +118,9 @@ unpredictable css rules order in build */
|
|
|
118
118
|
padding: 0 8px;
|
|
119
119
|
}
|
|
120
120
|
.pc-form-block_with-background .pc-form-block__row {
|
|
121
|
-
padding-top:
|
|
122
|
-
}
|
|
123
|
-
.pc-form-block_with-background .pc-form-block__row_padding-bottom_m {
|
|
121
|
+
padding-top: 32px;
|
|
124
122
|
padding-bottom: 32px;
|
|
125
123
|
}
|
|
126
|
-
.pc-form-block_with-background .pc-form-block__row_padding-bottom_l {
|
|
127
|
-
padding-bottom: 48px;
|
|
128
|
-
}
|
|
129
124
|
.pc-form-block_with-background .pc-form-block__row_direction_form-content .pc-form-block__content-wrapper, .pc-form-block_with-background .pc-form-block__row_direction_content-form .pc-form-block__content-wrapper, .pc-form-block_with-background .pc-form-block__row_direction_center .pc-form-block__content-wrapper {
|
|
130
125
|
padding-right: 16px;
|
|
131
126
|
padding-left: 16px;
|
|
@@ -16,8 +16,7 @@ const FormBlock = (props) => {
|
|
|
16
16
|
const { formData, title, textContent, direction = models_1.FormBlockDirection.Center, background } = props;
|
|
17
17
|
const [contentLoaded, setContentLoaded] = (0, react_1.useState)(false);
|
|
18
18
|
const isMobile = (0, react_1.useContext)(mobileContext_1.MobileContext);
|
|
19
|
-
const
|
|
20
|
-
const paddingBottom = background && ((_a = background.style) === null || _a === void 0 ? void 0 : _a.backgroundColor) && !hasImage ? 'l' : 'm'; // bigger padding for case with background color and no image
|
|
19
|
+
const withBackground = Boolean(background && (background.src || background.desktop || ((_a = background.style) === null || _a === void 0 ? void 0 : _a.backgroundColor)));
|
|
21
20
|
const onContentLoad = (0, react_1.useCallback)(() => {
|
|
22
21
|
setContentLoaded(true);
|
|
23
22
|
}, []);
|
|
@@ -32,7 +31,7 @@ const FormBlock = (props) => {
|
|
|
32
31
|
formType = models_1.FormBlockDataTypes.HUBSPOT;
|
|
33
32
|
}
|
|
34
33
|
return (react_1.default.createElement("div", { className: b({
|
|
35
|
-
'with-background':
|
|
34
|
+
'with-background': withBackground,
|
|
36
35
|
'form-type': formType,
|
|
37
36
|
}) },
|
|
38
37
|
background && (react_1.default.createElement(components_1.BackgroundImage, Object.assign({}, background, { className: b('media'), imageClassName: b('image') }))),
|
|
@@ -41,7 +40,6 @@ const FormBlock = (props) => {
|
|
|
41
40
|
? grid_1.GridAlignItems.Center
|
|
42
41
|
: grid_1.GridAlignItems.Start, className: b('row', {
|
|
43
42
|
direction,
|
|
44
|
-
'padding-bottom': paddingBottom,
|
|
45
43
|
}) },
|
|
46
44
|
react_1.default.createElement(grid_1.Col, { sizes: colSizes, className: b('content-col') }, textContent && (react_1.default.createElement("div", { className: b('content-wrapper') },
|
|
47
45
|
react_1.default.createElement(sub_blocks_1.Content, Object.assign({ theme: "default" }, textContent, { centered: direction === models_1.FormBlockDirection.Center, colSizes: { all: 12 }, className: b('content') }))))),
|
|
@@ -118,14 +118,9 @@ unpredictable css rules order in build */
|
|
|
118
118
|
padding: 0 8px;
|
|
119
119
|
}
|
|
120
120
|
.pc-form-block_with-background .pc-form-block__row {
|
|
121
|
-
padding-top:
|
|
122
|
-
}
|
|
123
|
-
.pc-form-block_with-background .pc-form-block__row_padding-bottom_m {
|
|
121
|
+
padding-top: 32px;
|
|
124
122
|
padding-bottom: 32px;
|
|
125
123
|
}
|
|
126
|
-
.pc-form-block_with-background .pc-form-block__row_padding-bottom_l {
|
|
127
|
-
padding-bottom: 48px;
|
|
128
|
-
}
|
|
129
124
|
.pc-form-block_with-background .pc-form-block__row_direction_form-content .pc-form-block__content-wrapper, .pc-form-block_with-background .pc-form-block__row_direction_content-form .pc-form-block__content-wrapper, .pc-form-block_with-background .pc-form-block__row_direction_center .pc-form-block__content-wrapper {
|
|
130
125
|
padding-right: 16px;
|
|
131
126
|
padding-left: 16px;
|
|
@@ -14,8 +14,7 @@ const FormBlock = (props) => {
|
|
|
14
14
|
const { formData, title, textContent, direction = FormBlockDirection.Center, background } = props;
|
|
15
15
|
const [contentLoaded, setContentLoaded] = useState(false);
|
|
16
16
|
const isMobile = useContext(MobileContext);
|
|
17
|
-
const
|
|
18
|
-
const paddingBottom = background && ((_a = background.style) === null || _a === void 0 ? void 0 : _a.backgroundColor) && !hasImage ? 'l' : 'm'; // bigger padding for case with background color and no image
|
|
17
|
+
const withBackground = Boolean(background && (background.src || background.desktop || ((_a = background.style) === null || _a === void 0 ? void 0 : _a.backgroundColor)));
|
|
19
18
|
const onContentLoad = useCallback(() => {
|
|
20
19
|
setContentLoaded(true);
|
|
21
20
|
}, []);
|
|
@@ -30,7 +29,7 @@ const FormBlock = (props) => {
|
|
|
30
29
|
formType = FormBlockDataTypes.HUBSPOT;
|
|
31
30
|
}
|
|
32
31
|
return (React.createElement("div", { className: b({
|
|
33
|
-
'with-background':
|
|
32
|
+
'with-background': withBackground,
|
|
34
33
|
'form-type': formType,
|
|
35
34
|
}) },
|
|
36
35
|
background && (React.createElement(BackgroundImage, Object.assign({}, background, { className: b('media'), imageClassName: b('image') }))),
|
|
@@ -39,7 +38,6 @@ const FormBlock = (props) => {
|
|
|
39
38
|
? GridAlignItems.Center
|
|
40
39
|
: GridAlignItems.Start, className: b('row', {
|
|
41
40
|
direction,
|
|
42
|
-
'padding-bottom': paddingBottom,
|
|
43
41
|
}) },
|
|
44
42
|
React.createElement(Col, { sizes: colSizes, className: b('content-col') }, textContent && (React.createElement("div", { className: b('content-wrapper') },
|
|
45
43
|
React.createElement(Content, Object.assign({ theme: "default" }, textContent, { centered: direction === FormBlockDirection.Center, colSizes: { all: 12 }, className: b('content') }))))),
|