Skip to content

Commit

Permalink
💄 Only show status indicator header if status indicator is set
Browse files Browse the repository at this point in the history
to avoid unnecessary spacing being added to the case list cards
  • Loading branch information
stevenbal committed Nov 2, 2023
1 parent dc0565a commit e1a7fff
Showing 1 changed file with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{% load icon_tags %}
<div class="card__header {{ status_indicator }}">
{% if status_indicator == "success" %}
{% icon icon="check_circle" icon_position="after" extra_classes="icon--"|add:status_indicator %} {{status_indicator_text}}
{% elif status_indicator == "failure" %}
{% icon icon="cancel" icon_position="after" extra_classes="icon--"|add:status_indicator %} {{status_indicator_text}}
{% else %}
{% icon icon=status_indicator icon_position="after" extra_classes="icon--"|add:status_indicator %} {{status_indicator_text}}
{% endif %}
</div>
{% if status_indicator %}
<div class="card__header {{ status_indicator }}">
{% if status_indicator == "success" %}
{% icon icon="check_circle" icon_position="after" extra_classes="icon--"|add:status_indicator %} {{status_indicator_text}}
{% elif status_indicator == "failure" %}
{% icon icon="cancel" icon_position="after" extra_classes="icon--"|add:status_indicator %} {{status_indicator_text}}
{% else %}
{% icon icon=status_indicator icon_position="after" extra_classes="icon--"|add:status_indicator %} {{status_indicator_text}}
{% endif %}
</div>
{% endif %}

0 comments on commit e1a7fff

Please sign in to comment.