Sha256: 2a2a9b1bb67a9d87f92e1431dae09677ff3c8c35d396e7fdca0368888bcb25c1

Contents?: true

Size: 438 Bytes

Versions: 48

Compression:

Stored size: 438 Bytes

Contents

module Lookbook
  class ButtonGroup::Component < Lookbook::BaseComponent
    renders_many :buttons, ->(copy: nil, **attrs, &block) do
      attrs[:size] = @size
      if copy.present?
        lookbook_render :copy_button, target: copy, **attrs, &block
      else
        lookbook_render :button, **attrs, &block
      end
    end

    def initialize(size: :md, **html_attrs)
      @size = size
      super(**html_attrs)
    end
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

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