Sha256: e6a70b6a6665071d46bbae62c7ecec6907c187b40823cfa16c3a2098cd5ac9b9

Contents?: true

Size: 753 Bytes

Versions: 1

Compression:

Stored size: 753 Bytes

Contents

<%= render(Primer::BaseComponent.new(tag: :div)) do %>
  <% if acts_as_form_input? %>
    <span data-list-inputs="true">
      <%= @form_builder.hidden_field(@input_name, multiple: multi_select?, skip_default_ids: true) %>
    </span>
  <% end %>
  <% if heading %>
    <%= heading %>
  <% end %>
  <%= render(Primer::BaseComponent.new(tag: :ul, **@system_arguments)) do %>
    <% items.each_with_index do |item, index| %>
      <%# the conditions here make sure two dividers are never rendered one after the other %>
      <% if index > 0 && @show_dividers && !item.is_a?(Divider) && !items[index - 1].is_a?(Divider) %>
        <%= render(Primer::Alpha::ActionList::Divider.new) %>
      <% end %>
      <%= item %>
    <% end %>
  <% end %>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
primer_view_components-0.1.7 app/components/primer/alpha/action_list.html.erb