Skip to content

Commit

Permalink
Use component wrapper on summary card component
Browse files Browse the repository at this point in the history
  • Loading branch information
AshGDS committed Jan 7, 2025
1 parent b77ece5 commit 2459443
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@

id ||= nil
title ||= nil
data_attributes ||= {}
summary_card_actions ||= []
rows ||=[]

component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
component_helper.add_class("gem-c-summary-card")
%>
<% if title || rows.any? %>
<%= tag.div class: "gem-c-summary-card", id: id, data: data_attributes do %>
<%= tag.div(**component_helper.all_attributes) do %>
<%= tag.div class: "govuk-summary-card" do %>
<%= tag.div class: "govuk-summary-card__title-wrapper" do %>
<%= tag.h2 class: "govuk-summary-card__title" do %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ accessibility_criteria: |
- be focusable with a keyboard
- be usable with a keyboard
- indicate when it has focus
uses_component_wrapper_helper: true
examples:
default:
data:
Expand Down

0 comments on commit 2459443

Please sign in to comment.