Sha256: 149892566fab8125a58540b0d0aeb698105b7ddd8e0d799a9e029147b1080012

Contents?: true

Size: 429 Bytes

Versions: 61

Compression:

Stored size: 429 Bytes

Contents

module Lookbook
  class TabPanels::Component < Lookbook::BaseComponent
    renders_many :panels, ->(**attrs) do
      @panel_counter += 1
      attrs[:name] ||= "tab-#{@panel_counter}"
      Lookbook::TabPanels::Panel::Component.new(**attrs)
    end

    def initialize(**html_attrs)
      @panel_counter = 0
      super(**html_attrs)
    end

    protected

    def alpine_component
      "tabPanelsComponent"
    end
  end
end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
lookbook-2.3.4 app/components/lookbook/tab_panels/component.rb
lookbook-2.3.3 app/components/lookbook/tab_panels/component.rb
lookbook-2.3.2 app/components/lookbook/tab_panels/component.rb
lookbook-2.3.0 app/components/lookbook/tab_panels/component.rb
lookbook-2.2.2 app/components/lookbook/tab_panels/component.rb
lookbook-2.2.1 app/components/lookbook/tab_panels/component.rb
lookbook-2.2.0 app/components/lookbook/tab_panels/component.rb
lookbook-2.1.1 app/components/lookbook/tab_panels/component.rb
lookbook-2.1.0 app/components/lookbook/tab_panels/component.rb
lookbook-2.0.5 app/components/lookbook/tab_panels/component.rb
lookbook-2.0.4 app/components/lookbook/tab_panels/component.rb
lookbook-2.0.3 app/components/lookbook/tab_panels/component.rb
lookbook-2.0.2 app/components/lookbook/tab_panels/component.rb
lookbook-2.0.1 app/components/lookbook/tab_panels/component.rb
lookbook-2.0.0 app/components/lookbook/tab_panels/component.rb
lookbook-2.0.0.rc.3 app/components/lookbook/tab_panels/component.rb
lookbook-1.5.5 app/components/lookbook/tab_panels/component.rb
lookbook-1.5.4 app/components/lookbook/tab_panels/component.rb
lookbook-2.0.0.rc.2 app/components/lookbook/tab_panels/component.rb
lookbook-2.0.0.rc.1 app/components/lookbook/tab_panels/component.rb