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;
|
||||
}
|
||||
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
|
||||
if (!has(styles, 'bold')) {
|
||||
@ -38,7 +38,7 @@ const mapBlockStyles = (styles) => {
|
||||
return mappedStyles;
|
||||
}
|
||||
mappedStyles.inheritFromTheme = false;
|
||||
mappedStyles.bold = styles.bold === '1';
|
||||
mappedStyles.bold = styles.bold === '1' || styles.bold === true;
|
||||
if (has(styles, 'background_color') && styles.background_color) {
|
||||
mappedStyles.backgroundColor = styles.background_color;
|
||||
}
|
||||
|
@ -19,6 +19,9 @@ class FormFactory {
|
||||
'required' => true,
|
||||
'label_within' => true,
|
||||
],
|
||||
'styles' => [
|
||||
'full_width' => true,
|
||||
],
|
||||
],
|
||||
[
|
||||
'id' => 'submit',
|
||||
@ -27,6 +30,9 @@ class FormFactory {
|
||||
'params' => [
|
||||
'label' => __('Subscribe!', 'mailpoet'),
|
||||
],
|
||||
'styles' => [
|
||||
'full_width' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
'settings' => [
|
||||
|
Reference in New Issue
Block a user