Class: SolidusAdmin::UI::Forms::SearchField::Component

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/solidus_admin/ui/forms/search_field/component.rb

Instance Method Summary collapse

Constructor Details

#initialize(**attributes) ⇒ Component

Returns a new instance of Component.



4
5
6
7
8
9
# File 'app/components/solidus_admin/ui/forms/search_field/component.rb', line 4

def initialize(**attributes)
  @attributes = attributes
  @attributes[:type] ||= :search
  @attributes[:class] = "search-cancel:appearance-none peer !px-10 #{@attributes[:class]}"
  @attributes[:"data-#{stimulus_id}-target"] = "input"
end