Class: PhlexUI::ContextMenu

Inherits:
Base
  • Object
show all
Defined in:
lib/phlex_ui/context_menu.rb

Defined Under Namespace

Classes: Content, Item, Label, Separator, Trigger

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#before_template

Constructor Details

#initialize(options: {}, **attrs) ⇒ ContextMenu

Returns a new instance of ContextMenu.



5
6
7
8
9
# File 'lib/phlex_ui/context_menu.rb', line 5

def initialize(options: {}, **attrs)
  @options = options
  @options[:trigger] ||= "manual"
  super(**attrs)
end

Instance Method Details

#view_templateObject



11
12
13
# File 'lib/phlex_ui/context_menu.rb', line 11

def view_template(&)
  div(**attrs, &)
end