Display divider

[MAILPOET-2835]
This commit is contained in:
Pavel Dohnal
2020-04-28 14:58:41 +02:00
committed by Veljko V
parent 7f2c512a65
commit c62be0e0e9

View File

@@ -32,9 +32,11 @@ const DividerEdit = ({ attributes, setAttributes }: Props) => {
</>
);
const dividerStyles = {};
const dividerStyles = {} as React.CSSProperties;
if (attributes.type === Types.Divider) {
dividerStyles.borderTopStyle = attributes.style;
dividerStyles.height = 1;
dividerStyles.width = '100%';
}
return (
@@ -68,6 +70,11 @@ const DividerEdit = ({ attributes, setAttributes }: Props) => {
className={classnames('mailpoet_spacer', attributes.className)}
style={{
height: attributes.height,
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
width: '100%',
justifyContent: 'center',
}}
>
<div className="mailpoet_divider" style={dividerStyles} />