Class: Primer::ButtonGroupComponent
- Includes:
- ViewComponent::SlotableV2
- Defined in:
- app/components/primer/button_group_component.rb
Overview
Use ButtonGroupComponent to render a series of buttons.
Constant Summary
Constants inherited from Component
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Instance Method Summary collapse
-
#initialize(**system_arguments) ⇒ ButtonGroupComponent
constructor
A new instance of ButtonGroupComponent.
- #render? ⇒ Boolean
Methods inherited from Component
Methods included from ViewHelper
Methods included from JoinStyleArgumentsHelper
Methods included from FetchOrFallbackHelper
#fetch_or_fallback, #fetch_or_fallback_boolean
Methods included from ClassNameHelper
Constructor Details
#initialize(**system_arguments) ⇒ ButtonGroupComponent
Returns a new instance of ButtonGroupComponent.
23 24 25 26 27 28 29 30 31 |
# File 'app/components/primer/button_group_component.rb', line 23 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
33 34 35 |
# File 'app/components/primer/button_group_component.rb', line 33 def render? .any? end |