Class: UI::CommandEmptyComponent

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

Instance Method Summary collapse

Methods included from CommandEmptyBehavior

#command_empty_classes, #command_empty_data_attributes, #command_empty_html_attributes

Constructor Details

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

Returns a new instance of CommandEmptyComponent.



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

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

Instance Method Details

#callObject



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

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