Sha256: df4ed33f279ce5d10575e7609ff913e6bb70c9cb3d3bc78a922e12d1dcef0df1

Contents?: true

Size: 1.19 KB

Versions: 28

Compression:

Stored size: 1.19 KB

Contents

<div class="row">
  <div class="col-3">
      <nav class="<%= class_name %>">
      <div class="nav nav-pills flex-column" id="nav-tab" role="tablist">
        <% tabs.sort_by { |tab| tab.selected? ? 0 : 1 }.each do |tab| %>
          <%=
            link_to tab.title,
                    tab.path,
                    class: "nav-link #{tab.selected? ? 'active' : nil}",
                    id: "nav-#{tab.identifier}-tab",
                    type: 'button',
                    role: 'tab',
                    :'aria-controls' => "nav-#{tab.identifier}",
                    :'aria-selected' => tab.selected? ? 'true' : 'false'
          %>
        <% end %>
      </div>
    </nav>
  </div>

  <div class="col-9">
    <% tabs.each do |tab| %>
      <div class="tab-content" id="nav-tabContent">
        <div
          class="ps-3 tab-pane fade <%= tab.selected? ? 'show active' : nil %> <%= tab.identifier %>"
          id="nav-credentials"
          role="tabpanel"
          aria-labelledby="nav-<%= tab.identifier %>-tab"
          tabindex="0"
        >
          <div class="<%= tab.identifier %>">
            <%= tab.content %>
          </div>
        </div>
      </div>
    <% end %>
  </div>
</div>

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
active_element-0.0.31 app/views/active_element/components/_vertical_tabs.html.erb
active_element-0.0.30 app/views/active_element/components/_vertical_tabs.html.erb
active_element-0.0.29 app/views/active_element/components/_vertical_tabs.html.erb
active_element-0.0.28 app/views/active_element/components/_vertical_tabs.html.erb
active_element-0.0.27 app/views/active_element/components/_vertical_tabs.html.erb
active_element-0.0.26 app/views/active_element/components/_vertical_tabs.html.erb
active_element-0.0.24 app/views/active_element/components/_vertical_tabs.html.erb
active_element-0.0.23 app/views/active_element/components/_vertical_tabs.html.erb
active_element-0.0.22 app/views/active_element/components/_vertical_tabs.html.erb
active_element-0.0.21 app/views/active_element/components/_vertical_tabs.html.erb
active_element-0.0.19 app/views/active_element/components/_vertical_tabs.html.erb
active_element-0.0.18 app/views/active_element/components/_vertical_tabs.html.erb
active_element-0.0.17 app/views/active_element/components/_vertical_tabs.html.erb
active_element-0.0.16 app/views/active_element/components/_vertical_tabs.html.erb
active_element-0.0.15 app/views/active_element/components/_vertical_tabs.html.erb
active_element-0.0.14 app/views/active_element/components/_vertical_tabs.html.erb
active_element-0.0.13 app/views/active_element/components/_vertical_tabs.html.erb
active_element-0.0.12 app/views/active_element/components/_vertical_tabs.html.erb
active_element-0.0.11 app/views/active_element/components/_vertical_tabs.html.erb
active_element-0.0.10 app/views/active_element/components/_vertical_tabs.html.erb