Sha256: a6d64c5d116db4fabee21168280ebb7436837a4f39e6a621121df95a9f42c790

Contents?: true

Size: 1.39 KB

Versions: 93

Compression:

Stored size: 1.39 KB

Contents

<% if style == :tabs %>
  <div class="flex overflow-auto mac-styled-scrollbar" data-target="tab-switcher" data-style="tabs">
    <div class="button-group">
      <% visible_items.each do |tab| %>
        <%= a_link tab_path(tab),
          color: selected?(tab) ? :primary : :gray ,
          rounded: false,
          size: :sm,
          class: "active:outline-0 #{selected?(tab) ? "z-20" : "bg-gray-100 border-gray-300"}",
          title: tab.description,
          data: {
            tippy: tab.description.present? ? 'tooltip' : '',
            selected: selected?(tab),
            action: 'click->tabs#changeTab',
            tabs_id_param: tab.name
          } do %>
          <%= tab.name %>
        <% end %>
      <% end %>
    </div>
  </div>
<% else %>
  <div class="flex flex-wrap gap-2 p-2 <%= white_panel_classes %>" data-target="tab-switcher" data-style="pills">
    <% visible_items.each do |tab| %>
      <%= a_link tab_path(tab),
      color: selected?(tab) ? :primary : :gray,
      style: selected?(tab) ? :outline : :text,
      size: :sm,
      class: selected?(tab) ? "z-20 bg-primary-100" : "",
      title: tab.description,
      data: {
        tippy: tab.description.present? ? 'tooltip' : '',
        selected: selected?(tab),
        action: 'click->tabs#changeTab',
        tabs_id_param: tab.name
      } do %>
        <%= tab.name %>
      <% end %>
    <% end %>
  </div>
<% end %>

Version data entries

93 entries across 93 versions & 1 rubygems

Version Path
avo-2.53.0 app/components/avo/tab_switcher_component.html.erb
avo-2.52.0 app/components/avo/tab_switcher_component.html.erb
avo-2.49.0 app/components/avo/tab_switcher_component.html.erb
avo-2.48.0 app/components/avo/tab_switcher_component.html.erb
avo-2.47.0 app/components/avo/tab_switcher_component.html.erb
avo-2.46.0 app/components/avo/tab_switcher_component.html.erb
avo-2.45.0 app/components/avo/tab_switcher_component.html.erb
avo-2.44.0 app/components/avo/tab_switcher_component.html.erb
avo-2.43.0 app/components/avo/tab_switcher_component.html.erb
avo-2.42.2 app/components/avo/tab_switcher_component.html.erb
avo-2.42.1 app/components/avo/tab_switcher_component.html.erb
avo-2.42.0 app/components/avo/tab_switcher_component.html.erb
avo-2.41.0 app/components/avo/tab_switcher_component.html.erb
avo-2.40.0 app/components/avo/tab_switcher_component.html.erb
avo-2.39.0 app/components/avo/tab_switcher_component.html.erb
avo-2.38.0 app/components/avo/tab_switcher_component.html.erb
avo-2.37.2 app/components/avo/tab_switcher_component.html.erb
avo-2.37.1 app/components/avo/tab_switcher_component.html.erb
avo-2.37.0 app/components/avo/tab_switcher_component.html.erb
avo-2.36.3 app/components/avo/tab_switcher_component.html.erb