Class: UI::ButtonGroupSeparator
- Includes:
- SeparatorBehavior
- Defined in:
- app/components/ui/button_group_separator.rb
Overview
Separator - Phlex implementation
Visually divides buttons within a button group. Extends UI::Separator with button group specific styling.
Based on shadcn/ui ButtonGroup: ui.shadcn.com/docs/components/button-group
Instance Method Summary collapse
-
#initialize(orientation: :vertical, decorative: true, classes: "", **attributes) ⇒ ButtonGroupSeparator
constructor
A new instance of ButtonGroupSeparator.
- #view_template ⇒ Object
Methods included from SeparatorBehavior
#separator_classes, #separator_html_attributes
Constructor Details
#initialize(orientation: :vertical, decorative: true, classes: "", **attributes) ⇒ ButtonGroupSeparator
Returns a new instance of ButtonGroupSeparator.
22 23 24 25 26 27 |
# File 'app/components/ui/button_group_separator.rb', line 22 def initialize(orientation: :vertical, decorative: true, classes: "", **attributes) @orientation = orientation @decorative = decorative @classes = classes @attributes = attributes end |
Instance Method Details
#view_template ⇒ Object
29 30 31 |
# File 'app/components/ui/button_group_separator.rb', line 29 def view_template div(**separator_html_attributes.deep_merge(@attributes)) end |