Skip to content

Commit

Permalink
Fix: allow custom media-item--heading tag (#1976)
Browse files Browse the repository at this point in the history
  • Loading branch information
thekaveman authored Mar 22, 2024
2 parents 0fa3235 + 93293f8 commit 4a450a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions benefits/core/templates/core/includes/media-item.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
{% endblock icon %}
</div>
<div class="media-body">
<h3 class="media-body--heading">
{% block heading_wrapper %}
<{{ heading_tag|default:"h3" }} class="media-body--heading h3">
{% block heading %}
{% endblock heading %}
</h3>
</{{ heading_tag|default:"h3" }}>
{% endblock heading_wrapper %}
{% block body %}
{% endblock body %}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
{% include "core/includes/icon.html" with name="bankcardcheck" %}
{% endblock icon %}

{% block heading_wrapper %}
{% with heading_tag="h2" %}{{ block.super }}{% endwith %}
{% endblock heading_wrapper %}

{% block heading %}
{% translate "The next step is to connect your contactless card to your transit benefit" %}
{% endblock heading %}
Expand Down

0 comments on commit 4a450a4

Please sign in to comment.