Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

fix(card): Adding checks on props - FRONT-1138 #446

Merged
merged 1 commit into from
May 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/ec/packages/ec-component-card/ecl-card.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@

<article class="{{ _css_class }}"{{ _extra_attributes|raw }}>
<header class="ecl-card__header">
{% if _card.image.src %}
<div class="ecl-card__image" aria-label="{{ _card.image.alt }}" role="img" style="background-image:url('{{ _card.image.src }}')"></div>
{% if _card.image.src is defined and _card.image.src is not empty %}
{% set _card_img_aria_label = _card.image.alt is defined and _card.image.alt is not empty ? 'aria-label="' ~ _card.image.alt ~ '"' : '' %}
<div class="ecl-card__image" {{ _card_img_aria_label|raw }} role="img" style="background-image:url('{{ _card.image.src }}')"></div>
{% endif %}
{% if _card.meta is not empty %}
<div class="ecl-card__meta">{{ _card.meta|join(" | ") }}</div>
Expand Down