Class: SdrViewComponents::Tables::HeaderComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- SdrViewComponents::Tables::HeaderComponent
- Defined in:
- app/components/sdr_view_components/tables/header_component.rb
Overview
Component for rendering a table header.
Instance Attribute Summary collapse
-
#header_options ⇒ Object
readonly
Returns the value of attribute header_options.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#tooltip ⇒ Object
readonly
Returns the value of attribute tooltip.
Instance Method Summary collapse
- #classes ⇒ Object
-
#initialize(label:, classes: [], tooltip: nil, **header_options) ⇒ HeaderComponent
constructor
A new instance of HeaderComponent.
Methods inherited from BaseComponent
#args_for, #merge_actions, #merge_classes
Constructor Details
#initialize(label:, classes: [], tooltip: nil, **header_options) ⇒ HeaderComponent
Returns a new instance of HeaderComponent.
7 8 9 10 11 12 13 |
# File 'app/components/sdr_view_components/tables/header_component.rb', line 7 def initialize(label:, classes: [], tooltip: nil, **) @label = label @classes = classes @tooltip = tooltip @header_options = super() end |
Instance Attribute Details
#header_options ⇒ Object (readonly)
Returns the value of attribute header_options.
15 16 17 |
# File 'app/components/sdr_view_components/tables/header_component.rb', line 15 def @header_options end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
15 16 17 |
# File 'app/components/sdr_view_components/tables/header_component.rb', line 15 def label @label end |
#tooltip ⇒ Object (readonly)
Returns the value of attribute tooltip.
15 16 17 |
# File 'app/components/sdr_view_components/tables/header_component.rb', line 15 def tooltip @tooltip end |
Instance Method Details
#classes ⇒ Object
17 18 19 |
# File 'app/components/sdr_view_components/tables/header_component.rb', line 17 def classes merge_classes(@classes) end |