Class: ItemGroupComponent

Inherits:
Component show all
Defined in:
app/components/item_group_component.rb

Overview

ItemGroup — container for grouped content items.

Usage:

ItemGroup(divided: true, relaxed: true) {
  Item { |c|
    c.image { Image(src: "photo.jpg", size: "small") }
    c.header { text "Title" }
    c.description { text "Description" }
  }
}

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



20
21
22
23
24
25
26
27
28
29
# File 'app/components/item_group_component.rb', line 20

def to_s
  classes = class_names(
    "ui",
    { "divided" => divided, "relaxed" => relaxed,
      "link" => link, "unstackable" => unstackable },
    "items"
  )

  tag.div(class: classes) { @content }
end