Class: Card::CardComponent::HeaderComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Card::CardComponent::HeaderComponent
- Defined in:
- app/components/card/card_component.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(**options) ⇒ HeaderComponent
constructor
A new instance of HeaderComponent.
Constructor Details
#initialize(**options) ⇒ HeaderComponent
Returns a new instance of HeaderComponent.
21 22 23 24 25 26 |
# File 'app/components/card/card_component.rb', line 21 def initialize(**) @classes = [:classes] @styles = [:styles] @default_classses = 'card-header' end |
Instance Method Details
#call ⇒ Object
28 29 30 31 32 33 34 35 36 37 |
# File 'app/components/card/card_component.rb', line 28 def call content_tag(:div, content, class: Card.default_plus_passed_classes( @default_classses, @classes ), style: @styles ) end |