Class: UI::DropdownMenuSubComponent

Inherits:
ViewComponent::Base
  • Object
show all
Includes:
DropdownMenuSubBehavior
Defined in:
app/view_components/ui/dropdown_menu_sub_component.rb

Overview

SubComponent - ViewComponent implementation

Instance Method Summary collapse

Methods included from DropdownMenuSubBehavior

#dropdown_menu_sub_classes, #dropdown_menu_sub_html_attributes

Constructor Details

#initialize(classes: "", **attributes) ⇒ DropdownMenuSubComponent

Returns a new instance of DropdownMenuSubComponent.



7
8
9
10
# File 'app/view_components/ui/dropdown_menu_sub_component.rb', line 7

def initialize(classes: "", **attributes)
  @classes = classes
  @attributes = attributes
end

Instance Method Details

#callObject



12
13
14
15
16
# File 'app/view_components/ui/dropdown_menu_sub_component.rb', line 12

def call
   :div, **dropdown_menu_sub_html_attributes.merge(@attributes.except(:data)) do
    content
  end
end