Class: TagGroupComponent

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

Overview

TagGroup — a group of Tag (label) elements.

Usage:

TagGroup {
  Tag { "One" }
  Tag { "Two" }
}
TagGroup(size: "huge", color: "blue") {
  Tag { "Fun" }
  Tag { "Happy" }
}

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



22
23
24
25
26
27
28
29
30
31
32
# File 'app/components/tag_group_component.rb', line 22

def to_s
  classes = class_names(
    "ui",
    size,
    color,
    { "basic" => basic, "tag" => tag_style, "circular" => circular },
    "labels"
  )

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