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;
|
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 });
|
const className = classnames('mailpoet_submit', { button: attributes.styles.inheritFromTheme });
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@@ -11,6 +11,7 @@ import { partial } from 'lodash';
|
|||||||
import ColorSettings from 'form_editor/components/color_settings';
|
import ColorSettings from 'form_editor/components/color_settings';
|
||||||
import FontSizeSetting from 'form_editor/components/font_size_settings';
|
import FontSizeSetting from 'form_editor/components/font_size_settings';
|
||||||
import { FormSettingsType } from 'form_editor/components/form_settings/form_settings';
|
import { FormSettingsType } from 'form_editor/components/form_settings/form_settings';
|
||||||
|
import FontFamilySettings from '../../components/font_family_settings';
|
||||||
|
|
||||||
type Styles = {
|
type Styles = {
|
||||||
fullWidth: boolean,
|
fullWidth: boolean,
|
||||||
@@ -19,6 +20,7 @@ type Styles = {
|
|||||||
backgroundColor?: string,
|
backgroundColor?: string,
|
||||||
fontColor?: string,
|
fontColor?: string,
|
||||||
fontSize?: number,
|
fontSize?: number,
|
||||||
|
fontFamily?: string,
|
||||||
borderSize?: number,
|
borderSize?: number,
|
||||||
borderRadius?: number,
|
borderRadius?: number,
|
||||||
borderColor?: string,
|
borderColor?: string,
|
||||||
@@ -103,6 +105,11 @@ const StylesSettings = ({
|
|||||||
onChange={partial(updateStyles, 'bold')}
|
onChange={partial(updateStyles, 'bold')}
|
||||||
className="mailpoet-automation-styles-bold-toggle"
|
className="mailpoet-automation-styles-bold-toggle"
|
||||||
/>
|
/>
|
||||||
|
<FontFamilySettings
|
||||||
|
name={MailPoet.I18n.t('formSettingsStylesFontFamily')}
|
||||||
|
value={styles.fontFamily || formSettings.fontFamily}
|
||||||
|
onChange={partial(updateStyles, 'fontFamily')}
|
||||||
|
/>
|
||||||
<RangeControl
|
<RangeControl
|
||||||
label={MailPoet.I18n.t('formSettingsInputPadding')}
|
label={MailPoet.I18n.t('formSettingsInputPadding')}
|
||||||
value={
|
value={
|
||||||
|
Reference in New Issue
Block a user