Class: UI::MenubarContent
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::MenubarContent
- Includes:
- MenubarContentBehavior
- Defined in:
- app/components/ui/menubar_content.rb
Overview
Content - Phlex implementation
Container for menu items that appears when trigger is activated.
Instance Method Summary collapse
-
#initialize(align: "start", side: "bottom", classes: "", **attributes) ⇒ MenubarContent
constructor
A new instance of MenubarContent.
- #view_template(&block) ⇒ Object
Methods included from MenubarContentBehavior
#menubar_content_classes, #menubar_content_data_attributes, #menubar_content_html_attributes
Constructor Details
#initialize(align: "start", side: "bottom", classes: "", **attributes) ⇒ MenubarContent
Returns a new instance of MenubarContent.
20 21 22 23 24 25 |
# File 'app/components/ui/menubar_content.rb', line 20 def initialize(align: "start", side: "bottom", classes: "", **attributes) @align = align @side = side @classes = classes @attributes = attributes end |
Instance Method Details
#view_template(&block) ⇒ Object
27 28 29 30 31 |
# File 'app/components/ui/menubar_content.rb', line 27 def view_template(&block) div(**.deep_merge(@attributes)) do yield if block_given? end end |