Add info text to the template info panel in sidebar.
[MAILPOET-6336]
This commit is contained in:
committed by
Rostislav Wolný
parent
1cff0c5ee1
commit
9ebcf9b506
@ -9,6 +9,8 @@ export function TemplateInfo() {
|
|||||||
( select ) => select( storeName ).getCurrentTemplate(),
|
( select ) => select( storeName ).getCurrentTemplate(),
|
||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
|
// @ts-expect-error Todo template type is not defined
|
||||||
|
const description = template?.description || '';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Panel className="mailpoet-email-sidebar__email-type-info">
|
<Panel className="mailpoet-email-sidebar__email-type-info">
|
||||||
@ -22,8 +24,13 @@ export function TemplateInfo() {
|
|||||||
{ /* @ts-expect-error Todo template type is not defined */ }
|
{ /* @ts-expect-error Todo template type is not defined */ }
|
||||||
{ template?.title || __( 'Template', 'mailpoet' ) }
|
{ template?.title || __( 'Template', 'mailpoet' ) }
|
||||||
</h2>
|
</h2>
|
||||||
{ /* @ts-expect-error Todo template type is not defined */ }
|
{ description && <p>{ description || '' }</p> }
|
||||||
<span>{ template?.description || '' }</span>
|
<p>
|
||||||
|
{ __(
|
||||||
|
'Edit this template to be used across multiple emails.',
|
||||||
|
'mailpoet'
|
||||||
|
) }
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</PanelRow>
|
</PanelRow>
|
||||||
</PanelBody>
|
</PanelBody>
|
||||||
|
Reference in New Issue
Block a user