Class: Koi::Tables::HeaderCellComponent
- Inherits:
-
Katalyst::Tables::HeaderCellComponent
- Object
- Katalyst::Tables::HeaderCellComponent
- Koi::Tables::HeaderCellComponent
- Defined in:
- app/components/koi/tables/header_cell_component.rb
Direct Known Subclasses
Koi::Tables::Header::AttachmentComponent, Koi::Tables::Header::BooleanComponent, Koi::Tables::Header::CurrencyComponent, Koi::Tables::Header::DateComponent, Koi::Tables::Header::DateTimeComponent, Koi::Tables::Header::ImageComponent, Koi::Tables::Header::LinkComponent, Koi::Tables::Header::NumberComponent, Koi::Tables::Header::TextComponent
Instance Attribute Summary collapse
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
- #default_html_attributes ⇒ Object
-
#initialize(table, attribute, label: nil, link: {}, width: nil, **html_attributes) ⇒ HeaderCellComponent
constructor
A new instance of HeaderCellComponent.
Constructor Details
#initialize(table, attribute, label: nil, link: {}, width: nil, **html_attributes) ⇒ HeaderCellComponent
Returns a new instance of HeaderCellComponent.
10 11 12 13 14 |
# File 'app/components/koi/tables/header_cell_component.rb', line 10 def initialize(table, attribute, label: nil, link: {}, width: nil, **html_attributes) @width = width super(table, attribute, label:, link:, **html_attributes) end |
Instance Attribute Details
#width ⇒ Object (readonly)
Returns the value of attribute width.
8 9 10 |
# File 'app/components/koi/tables/header_cell_component.rb', line 8 def width @width end |
Instance Method Details
#default_html_attributes ⇒ Object
16 17 18 |
# File 'app/components/koi/tables/header_cell_component.rb', line 16 def default_html_attributes super.merge_html(class: width_class) end |