Sha256: 5ee6fa67b8c821b1e5a9e322d5ef852bb12b3f7fbf0d2c6afc6c7f338cc6aa59

Contents?: true

Size: 573 Bytes

Versions: 3

Compression:

Stored size: 573 Bytes

Contents

module GovukDesignSystem
  module BackLinkHelper
    # Use the [back link component](https://design-system.service.gov.uk/components/back-link/)
    # to help users go back to the previous page in a multi-page transaction.
    #
    # Code based upon [nunjucks template](https://github.com/alphagov/govuk-frontend/blob/master/src/govuk/components/back-link/template.njk)
    def govukBackLink(href:, text: nil, html: nil, classes: "", attributes: {})
      attributes[:class] = "govuk-back-link #{classes}"

      link_to (html || text), href, attributes
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
govuk-design-system-rails-0.10.3 app/helpers/govuk_design_system/back_link_helper.rb
govuk-design-system-rails-0.10.2 app/helpers/govuk_design_system/back_link_helper.rb
govuk-design-system-rails-0.10.1 app/helpers/govuk_design_system/back_link_helper.rb