Hide spacers and limit dividers height in form on mobile
[MAILPOET-3024]
This commit is contained in:
committed by
Veljko V
parent
f956c5e13e
commit
a6b8330968
@@ -13,9 +13,16 @@ class Divider {
|
||||
];
|
||||
|
||||
public function render($block): string {
|
||||
$classes = isset($block['params']['class_name']) ? $block['params']['class_name'] : '';
|
||||
$classes = ['mailpoet_spacer'];
|
||||
if (isset($block['params']['type']) && $block['params']['type'] === 'divider') {
|
||||
$classes[] = 'mailpoet_has_divider';
|
||||
}
|
||||
if (!empty($block['params']['class_name'])) {
|
||||
$classes[] = $block['params']['class_name'];
|
||||
}
|
||||
$classAttr = join(' ', $classes);
|
||||
$height = $block['params']['height'] ?? self::DEFAULT_ATTRIBUTES['height'];
|
||||
return "<div class='mailpoet_spacer $classes' style='height: {$height}px;'>"
|
||||
return "<div class='{$classAttr}' style='height: {$height}px;'>"
|
||||
. $this->renderDivider($block)
|
||||
. '</div>';
|
||||
}
|
||||
|
Reference in New Issue
Block a user