Move preview text from tooltip
[MAILPOET-5757]
This commit is contained in:
@@ -36,20 +36,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mailpoet-settings-panel__subject-help {
|
.mailpoet-settings-panel__help {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
|
||||||
.components-text {
|
.components-text {
|
||||||
color: #757575;
|
color: #757575;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mailpoet-settings-panel__preview-text
|
|
||||||
.components-base-control__label
|
|
||||||
.mailpoet-preview-text__help-icon {
|
|
||||||
position: relative;
|
|
||||||
top: 6px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-post-visual-editor__content-area {
|
.edit-post-visual-editor__content-area {
|
||||||
|
@@ -3,12 +3,10 @@ import {
|
|||||||
ExternalLink,
|
ExternalLink,
|
||||||
PanelBody,
|
PanelBody,
|
||||||
TextareaControl,
|
TextareaControl,
|
||||||
Tooltip,
|
|
||||||
} from '@wordpress/components';
|
} from '@wordpress/components';
|
||||||
import { useDispatch } from '@wordpress/data';
|
import { useDispatch } from '@wordpress/data';
|
||||||
import { useEntityProp } from '@wordpress/core-data';
|
import { useEntityProp } from '@wordpress/core-data';
|
||||||
import { __ } from '@wordpress/i18n';
|
import { __ } from '@wordpress/i18n';
|
||||||
import { Icon, help } from '@wordpress/icons';
|
|
||||||
import ReactStringReplace from 'react-string-replace';
|
import ReactStringReplace from 'react-string-replace';
|
||||||
import { storeName } from '../../store';
|
import { storeName } from '../../store';
|
||||||
|
|
||||||
@@ -62,22 +60,6 @@ export function DetailsPanel() {
|
|||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
const previewTextLabel = (
|
|
||||||
<>
|
|
||||||
<span>{__('Preview text (recommended)', 'mailpoet')}</span>
|
|
||||||
<Tooltip
|
|
||||||
text={__(
|
|
||||||
'This text will appear in the inbox, underneath the subject line. Max length is 250 characters, but we recommend 80 characters.',
|
|
||||||
'mailpoet',
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<span className="mailpoet-preview-text__help-icon">
|
|
||||||
<Icon icon={help} size={20} />
|
|
||||||
</span>
|
|
||||||
</Tooltip>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PanelBody
|
<PanelBody
|
||||||
title={__('Details', 'mailpoet')}
|
title={__('Details', 'mailpoet')}
|
||||||
@@ -91,13 +73,13 @@ export function DetailsPanel() {
|
|||||||
onChange={(value) => updateEmailProperty('subject', value)}
|
onChange={(value) => updateEmailProperty('subject', value)}
|
||||||
data-automation-id="email_subject"
|
data-automation-id="email_subject"
|
||||||
/>
|
/>
|
||||||
<div className="mailpoet-settings-panel__subject-help">
|
<div className="mailpoet-settings-panel__help">
|
||||||
<Text>{subjectHelp}</Text>
|
<Text>{subjectHelp}</Text>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<TextareaControl
|
<TextareaControl
|
||||||
className="mailpoet-settings-panel__preview-text"
|
className="mailpoet-settings-panel__preview-text"
|
||||||
label={previewTextLabel}
|
label={<span>{__('Preview text (recommended)', 'mailpoet')}</span>}
|
||||||
placeholder={__(
|
placeholder={__(
|
||||||
"Add a preview text to capture subscribers' attention and increase open rates.",
|
"Add a preview text to capture subscribers' attention and increase open rates.",
|
||||||
'mailpoet',
|
'mailpoet',
|
||||||
@@ -106,6 +88,13 @@ export function DetailsPanel() {
|
|||||||
onChange={(value) => updateEmailProperty('preheader', value)}
|
onChange={(value) => updateEmailProperty('preheader', value)}
|
||||||
data-automation-id="email_preview_text"
|
data-automation-id="email_preview_text"
|
||||||
/>
|
/>
|
||||||
|
<div className="mailpoet-settings-panel__help">
|
||||||
|
<Text>
|
||||||
|
{__(
|
||||||
|
'This text will appear in the inbox, underneath the subject line.',
|
||||||
|
)}
|
||||||
|
</Text>
|
||||||
|
</div>
|
||||||
</PanelBody>
|
</PanelBody>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user