Sha256: edd897be359df343f95806635baa8c714a519a3bbc6c939b6127a2be9bce5201
Contents?: true
Size: 1.1 KB
Versions: 42
Compression:
Stored size: 1.1 KB
Contents
<% add_gem_component_stylesheet("secondary-navigation") id ||= nil items ||= [] component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns) component_helper.add_aria_attribute({label: aria_label}) component_helper.add_class('gem-c-secondary-navigation') component_helper.set_id(id) component_helper.add_role("navigation") %> <% if items.any? %> <%= tag.nav(**component_helper.all_attributes) do %> <%= tag.ul class: "gem-c-secondary-navigation__list" do %> <% items.each do |item| %> <% item_classes = %w( gem-c-secondary-navigation__list-item ) item_classes << "gem-c-secondary-navigation__list-item--current" if item[:current] item_aria_attributes = { current: "page" } if item[:current] %> <%= tag.li class: item_classes do %> <%= link_to item[:label], item[:href], class: "govuk-link govuk-link--no-visited-state gem-c-secondary-navigation__list-item-link", data: item[:data_attributes], aria: item_aria_attributes %> <% end %> <% end %> <% end %> <% end %> <% end %>
Version data entries
42 entries across 42 versions & 1 rubygems