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.0.0.beta.9 app/components/lookbook/tab_panels/component.rb
lookbook-2.0.0.beta.8 app/components/lookbook/tab_panels/component.rb
lookbook-2.0.0.beta.7 app/components/lookbook/tab_panels/component.rb
lookbook-2.0.0.beta.6 app/components/lookbook/tab_panels/component.rb
lookbook-2.0.0.beta.5 app/components/lookbook/tab_panels/component.rb
lookbook-2.0.0.beta.4 app/components/lookbook/tab_panels/component.rb
lookbook-2.0.0.beta.3 app/components/lookbook/tab_panels/component.rb
lookbook-2.0.0.beta.2 app/components/lookbook/tab_panels/component.rb
lookbook-1.5.3 app/components/lookbook/tab_panels/component.rb
lookbook-2.0.0.beta.1 app/components/lookbook/tab_panels/component.rb
lookbook-1.5.2 app/components/lookbook/tab_panels/component.rb
lookbook-2.0.0.beta.0 app/components/lookbook/tab_panels/component.rb
lookbook-1.5.1 app/components/lookbook/tab_panels/component.rb
lookbook-1.5.0 app/components/lookbook/tab_panels/component.rb
lookbook-1.4.5 app/components/lookbook/tab_panels/component.rb
lookbook-1.4.4 app/components/lookbook/tab_panels/component.rb
lookbook-1.4.3 app/components/lookbook/tab_panels/component.rb
lookbook-1.4.2 app/components/lookbook/tab_panels/component.rb
lookbook-1.4.1 app/components/lookbook/tab_panels/component.rb
lookbook-1.4.0 app/components/lookbook/tab_panels/component.rb