Add info text to the template info panel in sidebar.

[MAILPOET-6336]
This commit is contained in:
Rostislav Wolny
2024-12-03 10:30:25 +01:00
committed by Rostislav Wolný
parent 1cff0c5ee1
commit 9ebcf9b506

View File

@ -9,6 +9,8 @@ export function TemplateInfo() {
( select ) => select( storeName ).getCurrentTemplate(),
[]
);
// @ts-expect-error Todo template type is not defined
const description = template?.description || '';
return (
<Panel className="mailpoet-email-sidebar__email-type-info">
@ -22,8 +24,13 @@ export function TemplateInfo() {
{ /* @ts-expect-error Todo template type is not defined */ }
{ template?.title || __( 'Template', 'mailpoet' ) }
</h2>
{ /* @ts-expect-error Todo template type is not defined */ }
<span>{ template?.description || '' }</span>
{ description && <p>{ description || '' }</p> }
<p>
{ __(
'Edit this template to be used across multiple emails.',
'mailpoet'
) }
</p>
</div>
</PanelRow>
</PanelBody>