Class: ButtonGroupComponent
- Includes:
- Sizeable
- Defined in:
- app/components/button_group_component.rb
Overview
ButtonGroup — a group of buttons displayed together.
Usage:
ButtonGroup(color: "teal") {
Button { "Save" }
Dropdown(floating: true, button: true) { ... }
}
ButtonGroup(icon: true) {
Button { Icon(name: "bold") }
Button { Icon(name: "italic") }
}
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/button_group_component.rb', line 24 def to_s classes = class_names( "ui", color, size, { "icon" => icon, "vertical" => vertical, "basic" => basic, "labeled" => labeled }, "buttons" ) tag.div(**(class: classes)) { @content } end |