Display background image in the form editor
[MAILPOET-2880]
This commit is contained in:
@@ -68,6 +68,7 @@ h2 {
|
|||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mailpoet_text_label {
|
.mailpoet_text_label {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
|
@@ -12,23 +12,8 @@ const FormStylingBackground = ({ children }) => {
|
|||||||
borderColor,
|
borderColor,
|
||||||
alignment,
|
alignment,
|
||||||
formPadding,
|
formPadding,
|
||||||
} = useSelect(
|
backgroundImageUrl,
|
||||||
(select) => {
|
} = useSelect((select) => select('mailpoet-form-editor').getFormSettings(), []);
|
||||||
const settings = select('mailpoet-form-editor').getFormSettings();
|
|
||||||
|
|
||||||
return {
|
|
||||||
backgroundColor: settings.backgroundColor,
|
|
||||||
fontColor: settings.fontColor,
|
|
||||||
fontSize: settings.fontSize,
|
|
||||||
borderRadius: settings.borderRadius,
|
|
||||||
borderSize: settings.borderSize,
|
|
||||||
borderColor: settings.borderColor,
|
|
||||||
alignment: settings.alignment,
|
|
||||||
formPadding: settings.formPadding,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
[]
|
|
||||||
);
|
|
||||||
|
|
||||||
let borderStyle;
|
let borderStyle;
|
||||||
if (borderSize && borderColor) {
|
if (borderSize && borderColor) {
|
||||||
@@ -61,6 +46,7 @@ const FormStylingBackground = ({ children }) => {
|
|||||||
padding,
|
padding,
|
||||||
width: 700,
|
width: 700,
|
||||||
margin: '0 auto',
|
margin: '0 auto',
|
||||||
|
backgroundImage: `url(${backgroundImageUrl})`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
Reference in New Issue
Block a user