Class: Primer::ButtonGroupComponent
- Defined in:
- app/components/primer/button_group_component.rb
Overview
Use ButtonGroupComponent to render a series of buttons.
Constant Summary
Constants included from Status::Dsl
Constants included from ViewHelper
Constants included from TestSelectorHelper
TestSelectorHelper::TEST_SELECTOR_TAG
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Instance Method Summary collapse
-
#initialize(**system_arguments) ⇒ ButtonGroupComponent
constructor
A new instance of ButtonGroupComponent.
- #render? ⇒ Boolean
Methods included from JoinStyleArgumentsHelper
Methods included from TestSelectorHelper
Methods included from FetchOrFallbackHelper
#fetch_or_fallback, #fetch_or_fallback_boolean, #silence_deprecations?
Methods included from ClassNameHelper
Constructor Details
#initialize(**system_arguments) ⇒ ButtonGroupComponent
Returns a new instance of ButtonGroupComponent.
21 22 23 24 25 26 27 28 29 |
# File 'app/components/primer/button_group_component.rb', line 21 def initialize(**system_arguments) @system_arguments = system_arguments @system_arguments[:tag] ||= :div @system_arguments[:classes] = class_names( "BtnGroup", system_arguments[:classes] ) end |
Instance Method Details
#render? ⇒ Boolean
31 32 33 |
# File 'app/components/primer/button_group_component.rb', line 31 def render? .any? end |