Sha256: 00c31482801fd353e249f9ba91bbd422e9c4ba8ff4500b7d8edf965f62c233e9

Contents?: true

Size: 811 Bytes

Versions: 2

Compression:

Stored size: 811 Bytes

Contents

<%
  add_gem_component_stylesheet("inverse-header")

  padding_top ||= nil
  padding_bottom ||= nil
  subtext ||= nil

  component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
  component_helper.add_class("gem-c-inverse-header")
  component_helper.add_class("gem-c-inverse-header--full-width") if local_assigns[:full_width]
  component_helper.add_class("govuk-!-padding-top-#{padding_top}") if [*0..9].include?(padding_top)
  component_helper.add_class("govuk-!-padding-bottom-#{padding_bottom}") if [*0..9].include?(padding_bottom)
%>
<% block = yield %>
<% unless block.empty? %>
  <%= tag.header(**component_helper.all_attributes) do %>
    <%= block %>
    <%= content_tag(:p, subtext, class: "gem-c-inverse-header__subtext") if subtext %>
  <% end %>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
govuk_publishing_components-51.1.0 app/views/govuk_publishing_components/components/_inverse_header.html.erb
govuk_publishing_components-51.0.0 app/views/govuk_publishing_components/components/_inverse_header.html.erb