Display background image in the form editor

[MAILPOET-2880]
This commit is contained in:
Pavel Dohnal
2020-05-13 12:47:31 +02:00
committed by Veljko V
parent 7f396e47ab
commit d30b4e0084
2 changed files with 4 additions and 17 deletions

View File

@@ -68,6 +68,7 @@ h2 {
font-size: 1em;
line-height: 1.5;
}
.mailpoet_text_label {
font-size: 1em;
line-height: 1.2;

View File

@@ -12,23 +12,8 @@ const FormStylingBackground = ({ children }) => {
borderColor,
alignment,
formPadding,
} = useSelect(
(select) => {
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,
};
},
[]
);
backgroundImageUrl,
} = useSelect((select) => select('mailpoet-form-editor').getFormSettings(), []);
let borderStyle;
if (borderSize && borderColor) {
@@ -61,6 +46,7 @@ const FormStylingBackground = ({ children }) => {
padding,
width: 700,
margin: '0 auto',
backgroundImage: `url(${backgroundImageUrl})`,
}}
>
{children}