Class: PhlexKit::ButtonGroupSeparator
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::ButtonGroupSeparator
- Defined in:
- app/components/phlex_kit/button_group/button_group_separator.rb
Overview
Hairline divider between same-fill segments of a PhlexKit::ButtonGroup, ported from shadcn/ui's ButtonGroupSeparator. Runs perpendicular to the group's orientation automatically (button_group.css). See button_group.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ ButtonGroupSeparator
constructor
A new instance of ButtonGroupSeparator.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ ButtonGroupSeparator
Returns a new instance of ButtonGroupSeparator.
6 7 8 |
# File 'app/components/phlex_kit/button_group/button_group_separator.rb', line 6 def initialize(**attrs) @attrs = attrs end |
Instance Method Details
#view_template ⇒ Object
10 11 12 |
# File 'app/components/phlex_kit/button_group/button_group_separator.rb', line 10 def view_template div(**mix({ class: "pk-button-group-separator", role: "separator", aria: { hidden: true } }, @attrs)) end |