Class: SegmentGroupComponent
- Includes:
- Alignable
- Defined in:
- app/components/segment_group_component.rb
Overview
SegmentGroup — wraps multiple segments into a visual group.
Usage:
SegmentGroup {
Segment { text "Top" }
Segment { text "Bottom" }
}
SegmentGroup(aligned: "horizontal") {
Segment { text "Left" }
Segment { text "Right" }
}
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
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'app/components/segment_group_component.rb', line 24 def to_s classes = class_names( "ui", aligned, { "compact" => compact, "basic" => basic, "equal width" => equal_width, "wrapping" => wrapping }, "segments" ) tag.div(class: classes) { @content } end |