Module: CCS::FrontendHelpers::GovUKFrontend::TaskList

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

Overview

GOV.UK Task list

This helper is used for generating the task list component from the GDS - Components - Task list

Instance Method Summary collapse

Instance Method Details

#govuk_task_list(task_list_items) ⇒ ActiveSupport::SafeBuffer

Generates the HTML for the GOV.UK Task list component

Parameters:

  • task_list_items (Array<Hash>)

    An array of task list items. See Item#initialize for details of the items in the array.

  • options (Hash)

    options that will be used in customising the HTML

Returns:

  • (ActiveSupport::SafeBuffer)


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

def govuk_task_list(task_list_items, **)
  Components::GovUK::TaskList.new(context: self, task_list_items: task_list_items, **).render
end