Class: Tables::TrComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
lib/app/components/tables/tr_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(index: 0) ⇒ TrComponent

Returns a new instance of TrComponent.



7
8
9
# File 'lib/app/components/tables/tr_component.rb', line 7

def initialize(index: 0)
  @bg_color = 'bg-gray-50' if index.odd?
end