Sha256: f6c49cbee61fc4974b49153e9fc9c2c0ab6702d0c8f58057809ddb73e5649368

Contents?: true

Size: 844 Bytes

Versions: 1

Compression:

Stored size: 844 Bytes

Contents

<%
  add_gem_component_stylesheet("heading")

  brand ||= false
  lang = local_assigns[:lang].presence

  brand_helper = GovukPublishingComponents::AppHelpers::BrandHelper.new(brand)
  heading_helper = GovukPublishingComponents::Presenters::HeadingHelper.new(local_assigns)
  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
  component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)

  classes = %w(gem-c-heading)
  classes << heading_helper.classes
  classes << brand_helper.brand_class
  classes << brand_helper.border_color_class

  component_helper.add_class(classes.join(" "))
  component_helper.set_id(heading_helper.id)
  element = shared_helper.get_heading_level
%>
<%= content_tag(element, component_helper.all_attributes) do %>
  <%= text %>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
govuk_publishing_components-46.4.0 app/views/govuk_publishing_components/components/_heading.html.erb