Class: ListContentComponent

Inherits:
Component show all
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

Component::HTML_OPTIONS

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_sObject



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(**merge_html_options(class: classes)) { @content }
end