Class: UI::CardHeader

Inherits:
Phlex::HTML
  • Object
show all
Includes:
CardHeaderBehavior
Defined in:
app/components/ui/card_header.rb

Instance Method Summary collapse

Methods included from CardHeaderBehavior

#card_header_classes, #card_header_html_attributes, #render_card_header

Constructor Details

#initialize(classes: "", **attributes) ⇒ CardHeader

Returns a new instance of CardHeader.



6
7
8
9
# File 'app/components/ui/card_header.rb', line 6

def initialize(classes: "", **attributes)
  @classes = classes
  @attributes = attributes
end

Instance Method Details

#view_templateObject



11
12
13
# File 'app/components/ui/card_header.rb', line 11

def view_template(&)
  div(**card_header_html_attributes.deep_merge(@attributes), &)
end