Class: Railsboot::CardComponent

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

Overview

ViewComponent: renders the card block.

Instance Method Summary collapse

Constructor Details

#initialize(**html_attributes) ⇒ CardComponent

Returns a new instance of CardComponent.



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

def initialize(**html_attributes)
  @html_attributes = html_attributes

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