Class: UI::DropdownMenuLabelComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::DropdownMenuLabelComponent
- Includes:
- DropdownMenuLabelBehavior
- Defined in:
- app/view_components/ui/dropdown_menu_label_component.rb
Overview
LabelComponent - ViewComponent implementation
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(inset: false, classes: "", **attributes) ⇒ DropdownMenuLabelComponent
constructor
A new instance of DropdownMenuLabelComponent.
Methods included from DropdownMenuLabelBehavior
#dropdown_menu_label_classes, #dropdown_menu_label_data_attributes, #dropdown_menu_label_html_attributes
Constructor Details
#initialize(inset: false, classes: "", **attributes) ⇒ DropdownMenuLabelComponent
Returns a new instance of DropdownMenuLabelComponent.
7 8 9 10 11 |
# File 'app/view_components/ui/dropdown_menu_label_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 |
# File 'app/view_components/ui/dropdown_menu_label_component.rb', line 13 def call content_tag :div, **.merge(@attributes.except(:data)) do content end end |