From e70043129702f8b2a19d902958aaa75467a32343 Mon Sep 17 00:00:00 2001 From: Adam Goldstone <13471320+agoldstone93@users.noreply.github.com> Date: Wed, 20 Nov 2024 09:17:05 +0000 Subject: [PATCH 1/2] Add custom heading level to summary cards --- .../summary_list_component/card_component.html.erb | 2 +- .../summary_list_component/card_component.rb | 9 +++++++-- .../govuk_component/summary_list_card_component_spec.rb | 9 +++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/app/components/govuk_component/summary_list_component/card_component.html.erb b/app/components/govuk_component/summary_list_component/card_component.html.erb index 9e0a0701..9cc6cefe 100644 --- a/app/components/govuk_component/summary_list_component/card_component.html.erb +++ b/app/components/govuk_component/summary_list_component/card_component.html.erb @@ -1,6 +1,6 @@ <%= tag.div(**html_attributes) do %>
- <%= tag.h2(title, class: "#{brand}-summary-card__title") %> + <%= content_tag(heading_tag, title, class: "#{brand}-summary-card__title") %> <% if actions.any? %>