Class: UI::DropdownMenuSubTriggerComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::DropdownMenuSubTriggerComponent
- Includes:
- DropdownMenuSubTriggerBehavior
- Defined in:
- app/view_components/ui/dropdown_menu_sub_trigger_component.rb
Overview
SubTriggerComponent - ViewComponent implementation
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(inset: false, classes: "", **attributes) ⇒ DropdownMenuSubTriggerComponent
constructor
A new instance of DropdownMenuSubTriggerComponent.
Methods included from DropdownMenuSubTriggerBehavior
#dropdown_menu_sub_trigger_classes, #dropdown_menu_sub_trigger_data_attributes, #dropdown_menu_sub_trigger_html_attributes
Constructor Details
#initialize(inset: false, classes: "", **attributes) ⇒ DropdownMenuSubTriggerComponent
Returns a new instance of DropdownMenuSubTriggerComponent.
7 8 9 10 11 |
# File 'app/view_components/ui/dropdown_menu_sub_trigger_component.rb', line 7 def initialize(inset: false, classes: "", **attributes) @inset = inset @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/view_components/ui/dropdown_menu_sub_trigger_component.rb', line 13 def call content_tag :div, **.merge(@attributes.except(:data)) do safe_join([ content, chevron_icon_html ]) end end |