Sha256: 165665dcae284fa7ee38d12e3f7cfe408eb4923aaf0d7a6f85c86be95fce280b

Contents?: true

Size: 1.13 KB

Versions: 8

Compression:

Stored size: 1.13 KB

Contents

<div class="table overflow-x-auto mb-12 w-full rounded-lg border border-mid">
  <div class="table-header-group">
    <div class="table-row text-base font-medium text-white bg-mid">
      <% columns.each_with_index do |column, i| %>
        <div class="table-cell sticky top-0 z-10 p-4 <% if i.zero? %>rounded-tl-md<% elsif i == columns.size - 1 %>rounded-tr-md<% end %>"><%= column.label %></div>
      <% end %>
    </div>
  </div>

  <% if @rows.any? %>
  <div class="table-row-group">
    <% @rows.each do |row| %>
      <div class="table-row relative bg-mid/5 hover:bg-mid/20">
        <% @columns.each do |column| %>
          <div class="table-cell py-5 px-3 h-20 text-sm align-middle whitespace-nowrap border-b border-mid/20">
            <%= view_context.capture(row, &column.cell) %>
          </div>
        <% end %>
      </div>
    <% end %>
  </div>
</div>
  <% else %>
</div>
<div class="text-center mx-12 block border border-dashed py-12 rounded-lg">
  <h3 class="py-1 text-xl font-semibold text-gray-900">No <%= @term.pluralize %></h3>
  <p class="py-1 text-base text-gray-500">Get started by creating a new <%= @term %>.</p>
</div>
<% end %>

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
panda-cms-0.7.0 app/components/panda/cms/admin/table_component.html.erb
panda_cms-0.6.3 app/components/panda_cms/admin/table_component.html.erb
panda_cms-0.6.2 app/components/panda_cms/admin/table_component.html.erb
panda_cms-0.6.1 app/components/panda_cms/admin/table_component.html.erb
panda_cms-0.6.0 app/components/panda_cms/admin/table_component.html.erb
panda_cms-0.5.10 app/components/panda_cms/admin/table_component.html.erb
panda_cms-0.5.9 app/components/panda_cms/admin/table_component.html.erb
panda_cms-0.5.8 app/components/panda_cms/admin/table_component.html.erb