Class: ListContentComponent
- Defined in:
- app/components/list_content_component.rb
Overview
ListContent — content wrapper within a ListItem.
Usage:
ListItem {
Image(src: "avatar.png", class: "avatar")
ListContent {
ListHeader { 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
18 19 20 21 22 23 24 25 26 |
# File 'app/components/list_content_component.rb', line 18 def to_s classes = class_names( floated && "#{floated} floated", aligned && "#{aligned} aligned", "content" ) tag.div(**(class: classes)) { @content } end |