Class: PhlexKit::MenubarSeparator

Inherits:
BaseComponent show all
Defined in:
app/components/phlex_kit/menubar/menubar_separator.rb

Overview

See menubar.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ MenubarSeparator

Returns a new instance of MenubarSeparator.



4
# File 'app/components/phlex_kit/menubar/menubar_separator.rb', line 4

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

Instance Method Details

#view_templateObject



5
6
7
8
9
10
# File 'app/components/phlex_kit/menubar/menubar_separator.rb', line 5

def view_template
  base = { class: "pk-menubar-separator" }
  # Default only when the caller didn't supply their own — `mix` fuses.
  base[:role] = "separator" unless attr_set?(:role)
  div(**mix(base, @attrs))
end