Class: ListHeaderComponent
- Defined in:
- app/components/list_header_component.rb
Overview
ListHeader — header text within a ListItem or ListContent.
Usage:
ListItem {
ListHeader { text "New York City" }
text "A lovely city"
}
ListItem {
ListContent {
ListHeader(href: "#") { text "Rachel" }
ListDescription { text "Last seen just now." }
}
}
Constant Summary
Constants inherited from Component
Instance Method Summary collapse
Methods inherited from Component
default, #initialize, #render_in, slot
Constructor Details
This class inherits a constructor from Component
Instance Method Details
#to_s ⇒ Object
21 22 23 24 25 26 27 |
# File 'app/components/list_header_component.rb', line 21 def to_s if href tag.a(**(class: "header", href: href)) { @content } else tag.div(**(class: "header")) { @content } end end |