Module: CCS::FrontendHelpers::GovUKFrontend::SummaryList

Included in:
CCS::FrontendHelpers::GovUKFrontend
Defined in:
lib/ccs/frontend_helpers/govuk_frontend/summary_list.rb

Overview

GOV.UK Summary list

This helper is used for generating the summary list component from the GDS - Components - Summary list

Instance Method Summary collapse

Instance Method Details

#govuk_summary_list(summary_list_items) ⇒ ActiveSupport::SafeBuffer

Generates the HTML for the GOV.UK Summary list component

Parameters:

  • summary_list_items (Array<Hash>)

    An array of options for the summary list rows. See Row#initialize for details of the items in the array.

  • card (Hash)

    attributes for the card, see Card#initialize for more details.

  • options (Hash)

    options that will be used in customising the HTML

Returns:

  • (ActiveSupport::SafeBuffer)


22
23
24
# File 'lib/ccs/frontend_helpers/govuk_frontend/summary_list.rb', line 22

def govuk_summary_list(summary_list_items, **)
  Components::GovUK::SummaryList.new(context: self, summary_list_items: summary_list_items, **).render
end