Add font settings to the submit block
[MAILPOET-2911]
This commit is contained in:
@@ -68,6 +68,10 @@ const SubmitEdit = ({ attributes, setAttributes }) => {
|
||||
styles.backgroundColor = attributes.styles.backgroundColor;
|
||||
}
|
||||
|
||||
if (attributes.styles.fontFamily && !attributes.styles.inheritFromTheme) {
|
||||
styles.fontFamily = attributes.styles.fontFamily;
|
||||
}
|
||||
|
||||
const className = classnames('mailpoet_submit', { button: attributes.styles.inheritFromTheme });
|
||||
|
||||
return (
|
||||
|
@@ -11,6 +11,7 @@ import { partial } from 'lodash';
|
||||
import ColorSettings from 'form_editor/components/color_settings';
|
||||
import FontSizeSetting from 'form_editor/components/font_size_settings';
|
||||
import { FormSettingsType } from 'form_editor/components/form_settings/form_settings';
|
||||
import FontFamilySettings from '../../components/font_family_settings';
|
||||
|
||||
type Styles = {
|
||||
fullWidth: boolean,
|
||||
@@ -19,6 +20,7 @@ type Styles = {
|
||||
backgroundColor?: string,
|
||||
fontColor?: string,
|
||||
fontSize?: number,
|
||||
fontFamily?: string,
|
||||
borderSize?: number,
|
||||
borderRadius?: number,
|
||||
borderColor?: string,
|
||||
@@ -103,6 +105,11 @@ const StylesSettings = ({
|
||||
onChange={partial(updateStyles, 'bold')}
|
||||
className="mailpoet-automation-styles-bold-toggle"
|
||||
/>
|
||||
<FontFamilySettings
|
||||
name={MailPoet.I18n.t('formSettingsStylesFontFamily')}
|
||||
value={styles.fontFamily || formSettings.fontFamily}
|
||||
onChange={partial(updateStyles, 'fontFamily')}
|
||||
/>
|
||||
<RangeControl
|
||||
label={MailPoet.I18n.t('formSettingsInputPadding')}
|
||||
value={
|
||||
|
Reference in New Issue
Block a user