Class: UI::CardTitle

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

Instance Method Summary collapse

Methods included from CardTitleBehavior

#card_title_classes, #card_title_html_attributes, #render_card_title

Constructor Details

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

Returns a new instance of CardTitle.



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

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

Instance Method Details

#view_template ⇒ Object



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

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