Class: CommentGroupComponent

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

Overview

CommentGroup — wrapper for a group of comments.

Usage:

CommentGroup(threaded: true) {
  Comment { |c| ... }
  Comment { |c| ... }
}

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



17
18
19
20
21
22
23
24
25
26
# File 'app/components/comment_group_component.rb', line 17

def to_s
  classes = class_names(
    "ui",
    size,
    { "threaded" => threaded, "minimal" => minimal, "inverted" => inverted },
    "comments"
  )

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