Class: UI::CommandListComponent

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

Instance Method Summary collapse

Methods included from CommandListBehavior

#command_list_classes, #command_list_data_attributes, #command_list_html_attributes

Constructor Details

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

Returns a new instance of CommandListComponent.



6
7
8
9
# File 'app/view_components/ui/command_list_component.rb', line 6

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

Instance Method Details

#call ⇒ Object



11
12
13
# File 'app/view_components/ui/command_list_component.rb', line 11

def call
  (:div, content, **command_list_html_attributes.deep_merge(@attributes))
end