Class: Koi::Tables::HeaderCellComponent

Inherits:
Katalyst::Tables::HeaderCellComponent
  • Object
show all
Defined in:
app/components/koi/tables/header_cell_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#widthObject (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_attributesObject



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