Class: Railsboot::CardComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/railsboot/card_component.rb

Constant Summary

Constants inherited from Component

Railsboot::Component::COLORS, Railsboot::Component::DEFAULT_COLOR

Instance Method Summary collapse

Constructor Details

#initialize(**html_attributes) ⇒ CardComponent

Returns a new instance of CardComponent.



9
10
11
12
13
14
15
16
# File 'app/components/railsboot/card_component.rb', line 9

def initialize(**html_attributes)
  @html_attributes = html_attributes

  @html_attributes[:class] = class_names(
    "card",
    html_attributes.delete(:class)
  )
end