Class: PhlexUI::Command::Input

Inherits:
Base
  • Object
show all
Defined in:
lib/phlex_ui/command/input.rb

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#before_template

Constructor Details

#initialize(placeholder: "Type a command or search...", **attrs) ⇒ Input

Returns a new instance of Input.



5
6
7
8
# File 'lib/phlex_ui/command/input.rb', line 5

def initialize(placeholder: "Type a command or search...", **attrs)
  @placeholder = placeholder
  super(**attrs)
end

Instance Method Details

#view_templateObject



10
11
12
13
14
15
# File 'lib/phlex_ui/command/input.rb', line 10

def view_template
  input_container do
    search_icon
    input(**attrs)
  end
end