Class: FlexiAdmin::Components::Form::TextInputComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- FlexiAdmin::Components::Form::TextInputComponent
- Defined in:
- lib/flexi_admin/components/form/text_input_component.rb
Instance Attribute Summary collapse
-
#form ⇒ Object
readonly
Returns the value of attribute form.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(form, name, options = {}) ⇒ TextInputComponent
constructor
A new instance of TextInputComponent.
- #input_classes ⇒ Object
Constructor Details
#initialize(form, name, options = {}) ⇒ TextInputComponent
Returns a new instance of TextInputComponent.
7 8 9 10 11 |
# File 'lib/flexi_admin/components/form/text_input_component.rb', line 7 def initialize(form, name, = {}) @form = form @name = name @options = end |
Instance Attribute Details
#form ⇒ Object (readonly)
Returns the value of attribute form.
5 6 7 |
# File 'lib/flexi_admin/components/form/text_input_component.rb', line 5 def form @form end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/flexi_admin/components/form/text_input_component.rb', line 5 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/flexi_admin/components/form/text_input_component.rb', line 5 def @options end |
Instance Method Details
#input_classes ⇒ Object
13 14 15 |
# File 'lib/flexi_admin/components/form/text_input_component.rb', line 13 def input_classes "appearance-none inline-flex bg-gray-25 disabled:cursor-not-allowed text-gray-600 disabled:opacity-50 rounded py-2 px-3 leading-tight border focus:border-gray-600 focus-visible:ring-0 focus:text-gray-700 placeholder:text-gray-300 border-gray-200 w-full" end |