class NfgUi::Bootstrap::Components::ButtonGroup

Bootstrap Button Group Component An optional parent of the Button component

Public Instance Methods

vertical() click to toggle source
# File lib/nfg_ui/bootstrap/components/button_group.rb, line 12
def vertical
  options.fetch(:vertical, false)
end

Private Instance Methods

assistive_html_attributes() click to toggle source
# File lib/nfg_ui/bootstrap/components/button_group.rb, line 18
def assistive_html_attributes
  # Prevent overwriting supplied aria attributes in the component's :options
  aria = options[:aria].present? ? options[:aria] : {}
  aria.merge!(label: 'action buttons')

  super.merge!(role: 'group', aria: aria)
end
component_css_class() click to toggle source

Bootstrap does not stack btn-group and btn-group-vertical together When a button group is set as vertical, it is only `btn-group-vertical`

# File lib/nfg_ui/bootstrap/components/button_group.rb, line 28
def component_css_class
  "btn-group#{'-vertical' if vertical}"
end
non_html_attribute_options() click to toggle source
# File lib/nfg_ui/bootstrap/components/button_group.rb, line 32
def non_html_attribute_options
  super.push(:vertical)
end