Module: CCS::FrontendHelpers::GovUKFrontend::Header

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

Overview

GOV.UK Header

This helper is used for generating the header component from the GDS - Components - Header

Instance Method Summary collapse

Instance Method Details

#govuk_headerActiveSupport::SafeBuffer

Generates the HTML for the GOV.UK Header component

Parameters:

  • navigation (Hash)

    options for the navigation section of the header. See Navigation#initialize for details of the options.

  • menu_button (Hash)

    options for the menu button in the header. See Navigation#initialize for details of the options.

  • service (Hash)

    options for the service name

  • options (Hash)

    options that will be used in customising the HTML

Returns:

  • (ActiveSupport::SafeBuffer)

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

def govuk_header(**)
  Components::GovUK::Header.new(context: self, **).render
end