Add input padding form settings

[MAILPOET-2809]
This commit is contained in:
Pavel Dohnal
2020-04-20 11:32:38 +02:00
committed by Veljko V
parent e844a49e09
commit 1c47a6942b
2 changed files with 10 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ import React, { useRef } from 'react';
import {
Panel,
PanelBody,
RangeControl,
} from '@wordpress/components';
import MailPoet from 'mailpoet';
import PropTypes from 'prop-types';
@@ -48,6 +49,14 @@ const BasicSettingsPanel = ({ onToggle, isOpened }) => {
value={settings.fontSize}
onChange={partial(updateStyles, 'fontSize')}
/>
<RangeControl
label={MailPoet.I18n.t('formSettingsInputPadding')}
value={settings.inputPadding !== undefined ? settings.inputPadding : 5}
min={0}
max={30}
allowReset
onChange={partial(updateStyles, 'inputPadding')}
/>
</div>
</PanelBody>
</Panel>