Sha256: a7c99b2e979645ac6469cc07ae1f00de1952b76fefccd5caba5e262231fffbea

Contents?: true

Size: 762 Bytes

Versions: 2

Compression:

Stored size: 762 Bytes

Contents

module BootstrapIt
  #
  module ViewHelpers
    #
    # ButtonGroup
    #
    # @author [alexiss]
    #
    class ButtonGroup < WrapIt::Container
      include Sizable
      include Justifable

      html_class 'btn-group'
      html_class_prefix 'btn-group-'

      switch :vertical, html_class: true

      child :button, 'BootstrapIt::ViewHelpers::Button'
      child :dropdown, 'BootstrapIt::ViewHelpers::DropdownButton'

      child :radio, 'BootstrapIt::ViewHelpers::Button' do |button|
        set_html_data(:toggle, 'buttons')
      end

      child :checkbox, 'BootstrapIt::ViewHelpers::Button' do |button|
        set_html_data(:toggle, 'buttons')
      end
    end

    WrapIt.register :button_group, 'BootstrapIt::ViewHelpers::ButtonGroup'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bootstrap_it-0.1.1 lib/bootstrap_it/view_helpers/button_group.rb
bootstrap_it-0.1.0 lib/bootstrap_it/view_helpers/button_group.rb