Sha256: 1f6ef3be3b05cab3af30f43a083b4b415cc7be21f248ccbaac4340261bc42468
Contents?: true
Size: 1.07 KB
Versions: 216
Compression:
Stored size: 1.07 KB
Contents
<% aria_label ||= nil extra_spacing ||= nil id ||= nil items ||= [] list_type ||= "unordered" visible_counters ||= nil shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns) classes = %w[gem-c-list govuk-list] classes << "govuk-list--bullet" if visible_counters and list_type === "unordered" classes << "govuk-list--number" if visible_counters and list_type === "number" classes << "govuk-list--spaced" if extra_spacing # Setting the `margin_bottom` to 4 is the same as the default margin - so we # can omit the override class. To do this we leave out `4` from the array: classes << shared_helper.get_margin_bottom if [0,1,2,3,5,6,7,8,9].include?(local_assigns[:margin_bottom]) # Default list type is unordered list. list_tag = "ul" # Set to ordered list to override default. list_tag = "ol" if list_type === "number" %> <% if items.any? %> <%= content_tag list_tag, class: classes, id: id, "aria-label": aria_label do %> <% items.each do |item| %> <li><%= raw(item) %></li> <% end %> <% end %> <% end %>
Version data entries
216 entries across 216 versions & 1 rubygems