Sha256: c8078b9577bbe59f09b0dcfc087738570a72553899e4404ae37c085f3d369b14

Contents?: true

Size: 949 Bytes

Versions: 28

Compression:

Stored size: 949 Bytes

Contents

<nav class="<%= class_name %>">
  <div class="nav nav-tabs" id="nav-tab" role="tablist">
    <% tabs.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>

<% tabs.each do |tab| %>
  <div class="tab-content" id="nav-tabContent">
    <div
      class="p-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 %>

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
active_element-0.0.9 app/views/active_element/components/_horizontal_tabs.html.erb
active_element-0.0.8 app/views/active_element/components/_horizontal_tabs.html.erb
active_element-0.0.7 app/views/active_element/components/_horizontal_tabs.html.erb
active_element-0.0.6 app/views/active_element/components/_horizontal_tabs.html.erb
active_element-0.0.5 app/views/active_element/components/_horizontal_tabs.html.erb
active_element-0.0.4 app/views/active_element/components/_horizontal_tabs.html.erb
active_element-0.0.3 app/views/active_element/components/_horizontal_tabs.html.erb
active_element-0.0.2 app/views/active_element/components/_horizontal_tabs.html.erb