Sha256: cb094af4298377c87d731f13ccfcb5e27af4dfe6f3df29f7400f5302dd08d5be

Contents?: true

Size: 1.34 KB

Versions: 20

Compression:

Stored size: 1.34 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" 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" : "",
      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

20 entries across 20 versions & 1 rubygems

Version Path
avo-2.16.1.pre.1.nativefields app/components/avo/tab_switcher_component.html.erb
avo-2.16.0 app/components/avo/tab_switcher_component.html.erb
avo-2.15.3 app/components/avo/tab_switcher_component.html.erb
avo-2.15.3.pre.1.data.attrs.to.sidebar.items app/components/avo/tab_switcher_component.html.erb
avo-2.15.2 app/components/avo/tab_switcher_component.html.erb
avo-2.15.2.pre.1 app/components/avo/tab_switcher_component.html.erb
avo-2.15.1 app/components/avo/tab_switcher_component.html.erb
avo-2.15.0 app/components/avo/tab_switcher_component.html.erb
avo-2.14.3.pre.7.polytranslations1 app/components/avo/tab_switcher_component.html.erb
avo-2.14.3.pre.6.nosprockets app/components/avo/tab_switcher_component.html.erb
avo-2.14.3.pre.5.nosprockets app/components/avo/tab_switcher_component.html.erb
avo-2.14.3.pre.4.tosqlfix app/components/avo/tab_switcher_component.html.erb
avo-2.14.3.pre.3.jsbundling app/components/avo/tab_switcher_component.html.erb
avo-2.14.3.pre.2.tailwindcss app/components/avo/tab_switcher_component.html.erb
avo-2.14.3.pre.1.branding app/components/avo/tab_switcher_component.html.erb
avo-2.14.2 app/components/avo/tab_switcher_component.html.erb
avo-2.14.2.pre.1 app/components/avo/tab_switcher_component.html.erb
avo-2.14.1 app/components/avo/tab_switcher_component.html.erb
avo-2.14.1.pre.1 app/components/avo/tab_switcher_component.html.erb
avo-2.14.0 app/components/avo/tab_switcher_component.html.erb