Sha256: 2de1c92df5655b87db08ac8e56f5095eed27cf29b3feeebf235ef70aa66241a2
Contents?: true
Size: 458 Bytes
Versions: 18
Compression:
Stored size: 458 Bytes
Contents
module Lookbook class ButtonGroup::Component < Lookbook::BaseComponent renders_many :buttons, ->(copy: nil, **attrs, &block) do attrs[:size] = @size instance = if copy.present? CopyButton::Component.new(target: copy, **attrs) else Button::Component.new(**attrs) end render instance, &block end def initialize(size: :md, **html_attrs) @size = size super(**html_attrs) end end end
Version data entries
18 entries across 18 versions & 1 rubygems