Sha256: 8f6df7d6288d6fd309a38f01b2272e252d07d728d75d767e61dd494fda7a07fb

Contents?: true

Size: 1.04 KB

Versions: 2

Compression:

Stored size: 1.04 KB

Contents

<%= content_tag :div,
  data: {
    target: "tab-group",
    index: index,
    controller: "tabs",
    tabs_view_value: view,
    tabs_group_id_value: group.id,
    tabs_active_tab_value: active_tab_name,
    tabs_resource_name_value: resource.underscore_name
  } do %>
  <% visible_tabs.each_with_index do |tab, index| %>
    <%= content_tag :div, **args(tab) do %>
      <%= render Avo::PanelHeaderComponent.new name: group.title, description: group.description %>
      <div class="border rounded-lg p-2 -mx-2 -my-2 lg:p-4 lg:-mx-4 lg:-my-3 space-y-4">
        <%= render Avo::TabSwitcherComponent.new resource: resource, current_tab: visible_tabs.first, group: group, active_tab_name: tab.name, view: view %>
        <% if !tab.is_empty? %>
          <div class="space-y-12">
            <% tab.visible_items.each do |item| %>
              <%= render Avo::Items::SwitcherComponent.new resource: resource, item: item, index: index, form: form, view: @view %>
            <% end %>
          </div>
        <% end %>
      </div>
    <% end %>
  <% end %>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
avo-3.15.1 app/components/avo/tab_group_component.html.erb
avo-3.15.0 app/components/avo/tab_group_component.html.erb