Class: PhlexKit::ButtonGroupSeparator

Inherits:
BaseComponent
  • Object
show all
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

Methods inherited from BaseComponent

#on

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_templateObject



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