Fix styling on template selection

[MAILPOET-1932]
This commit is contained in:
Pavel Dohnal
2019-04-03 10:16:58 +02:00
committed by M. Shull
parent 3acfc9bfb5
commit 1a4102ecff
2 changed files with 33 additions and 25 deletions

View File

@@ -119,31 +119,33 @@ class TemplateBox extends React.Component {
{ preview }
</div>
<div className="mailpoet_description">
<h3>{ name }</h3>
</div>
<div className="mailpoet_template_content">
<div className="mailpoet_description">
<h3>{ name }</h3>
</div>
<div className="mailpoet_actions">
{ readonly === '1' ? false : deleteLink }
<a
className="button button-primary"
data-automation-id={`select_template_${index}`}
onClick={this.onSelect}
role="button"
tabIndex={0}
onKeyDown={(event) => {
if ((['keydown', 'keypress'].includes(event.type) && ['Enter', ' '].includes(event.key))
) {
event.preventDefault();
this.onSelect();
}
}}
>
{' '}
{MailPoet.I18n.t('select')}
{' '}
<div className="mailpoet_actions">
{ readonly === '1' ? false : deleteLink }
<a
className="button button-primary"
data-automation-id={`select_template_${index}`}
onClick={this.onSelect}
role="button"
tabIndex={0}
onKeyDown={(event) => {
if ((['keydown', 'keypress'].includes(event.type) && ['Enter', ' '].includes(event.key))
) {
event.preventDefault();
this.onSelect();
}
}}
>
{' '}
{MailPoet.I18n.t('select')}
{' '}
</a>
</a>
</div>
</div>
</li>
);