Class: KozenetUi::HeaderComponent::SearchComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- KozenetUi::HeaderComponent::SearchComponent
- Defined in:
- app/components/kozenet_ui/header_component/search_component.rb
Overview
Search section for the HeaderComponent Renders a search input or form in the header
Constant Summary
Constants inherited from BaseComponent
Instance Attribute Summary
Attributes inherited from BaseComponent
#html_options, #size, #variant
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ SearchComponent
constructor
rubocop:disable Metrics/MethodLength.
Constructor Details
#initialize(options = {}) ⇒ SearchComponent
rubocop:disable Metrics/MethodLength
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/components/kozenet_ui/header_component/search_component.rb', line 12 def initialize( = {}) placeholder = .fetch(:placeholder, "Search...") name = .fetch(:name, "q") value = .fetch(:value, nil) action = .fetch(:action, "#") method = .fetch(:method, :get) = .fetch(:html_options, {}) super(**) @placeholder = placeholder @name = name @value = value @action = action @method = method end |