Add full width as default email input and submit width
[MAILPOET-2604]
This commit is contained in:
committed by
Veljko V
parent
faa9c07eb1
commit
df34b6e287
@ -30,7 +30,7 @@ const mapBlockStyles = (styles) => {
|
|||||||
return backwardCompatibleBlockStyles;
|
return backwardCompatibleBlockStyles;
|
||||||
}
|
}
|
||||||
const mappedStyles = {
|
const mappedStyles = {
|
||||||
fullWidth: styles.full_width === '1',
|
fullWidth: styles.full_width === '1' || styles.full_width === true,
|
||||||
};
|
};
|
||||||
// Detect if styles inherit from theme by checking if bold param is present
|
// Detect if styles inherit from theme by checking if bold param is present
|
||||||
if (!has(styles, 'bold')) {
|
if (!has(styles, 'bold')) {
|
||||||
@ -38,7 +38,7 @@ const mapBlockStyles = (styles) => {
|
|||||||
return mappedStyles;
|
return mappedStyles;
|
||||||
}
|
}
|
||||||
mappedStyles.inheritFromTheme = false;
|
mappedStyles.inheritFromTheme = false;
|
||||||
mappedStyles.bold = styles.bold === '1';
|
mappedStyles.bold = styles.bold === '1' || styles.bold === true;
|
||||||
if (has(styles, 'background_color') && styles.background_color) {
|
if (has(styles, 'background_color') && styles.background_color) {
|
||||||
mappedStyles.backgroundColor = styles.background_color;
|
mappedStyles.backgroundColor = styles.background_color;
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,9 @@ class FormFactory {
|
|||||||
'required' => true,
|
'required' => true,
|
||||||
'label_within' => true,
|
'label_within' => true,
|
||||||
],
|
],
|
||||||
|
'styles' => [
|
||||||
|
'full_width' => true,
|
||||||
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'id' => 'submit',
|
'id' => 'submit',
|
||||||
@ -27,6 +30,9 @@ class FormFactory {
|
|||||||
'params' => [
|
'params' => [
|
||||||
'label' => __('Subscribe!', 'mailpoet'),
|
'label' => __('Subscribe!', 'mailpoet'),
|
||||||
],
|
],
|
||||||
|
'styles' => [
|
||||||
|
'full_width' => true,
|
||||||
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'settings' => [
|
'settings' => [
|
||||||
|
Reference in New Issue
Block a user