Class: Card::CardComponent::FooterComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/card/card_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(**options) ⇒ FooterComponent

Returns a new instance of FooterComponent.



42
43
44
45
46
47
# File 'app/components/card/card_component.rb', line 42

def initialize(**options)
  @classes = options[:classes]
  @styles = options[:styles]

  @default_classses = 'card-footer text-muted'
end

Instance Method Details

#callObject



49
50
51
52
53
54
55
56
57
58
# File 'app/components/card/card_component.rb', line 49

def call
  (:div,
    content,
    class: Card.default_plus_passed_classes(
      @default_classses,
      @classes
    ),
    style: @styles
  )
end