Class: PhlexKit::DropdownMenuSeparator

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/phlex_kit/dropdown_menu/dropdown_menu_separator.rb

Overview

A horizontal divider between groups of PhlexKit::DropdownMenuItems. See dropdown_menu.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ DropdownMenuSeparator

Returns a new instance of DropdownMenuSeparator.



4
5
6
# File 'app/components/phlex_kit/dropdown_menu/dropdown_menu_separator.rb', line 4

def initialize(**attrs)
  @attrs = attrs
end

Instance Method Details

#view_templateObject



8
9
10
# File 'app/components/phlex_kit/dropdown_menu/dropdown_menu_separator.rb', line 8

def view_template
  div(**mix({ role: "separator", "aria-orientation": "horizontal", class: "pk-dropdown-menu-separator" }, @attrs))
end