Class: UI::NavigationMenuContent
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::NavigationMenuContent
- Includes:
- NavigationMenuContentBehavior
- Defined in:
- app/components/ui/navigation_menu_content.rb
Overview
Content - Phlex implementation
Container for navigation menu content that appears when trigger is activated. Supports animated transitions based on motion direction.
Instance Method Summary collapse
-
#initialize(viewport: true, classes: "", **attributes) ⇒ NavigationMenuContent
constructor
A new instance of NavigationMenuContent.
- #view_template(&block) ⇒ Object
Methods included from NavigationMenuContentBehavior
#navigation_menu_content_classes, #navigation_menu_content_data_attributes, #navigation_menu_content_html_attributes
Constructor Details
#initialize(viewport: true, classes: "", **attributes) ⇒ NavigationMenuContent
Returns a new instance of NavigationMenuContent.
22 23 24 25 26 |
# File 'app/components/ui/navigation_menu_content.rb', line 22 def initialize(viewport: true, classes: "", **attributes) @viewport = @classes = classes @attributes = attributes end |
Instance Method Details
#view_template(&block) ⇒ Object
28 29 30 31 32 |
# File 'app/components/ui/navigation_menu_content.rb', line 28 def view_template(&block) div(**.deep_merge(@attributes)) do yield if block_given? end end |