Class: SimpleForm::Tailwind::Inputs::PrependStringInput
- Inherits:
-
Inputs::StringInput
- Object
- Inputs::StringInput
- SimpleForm::Tailwind::Inputs::PrependStringInput
- Includes:
- OverwriteClassWithErrorOrValidClass
- Defined in:
- lib/simple_form/tailwind/inputs/prepend_string_input.rb
Instance Method Summary collapse
Methods included from OverwriteClassWithErrorOrValidClass
Instance Method Details
#input(*args, &blk) ⇒ Object
11 12 13 14 15 |
# File 'lib/simple_form/tailwind/inputs/prepend_string_input.rb', line 11 def input(*args, &blk) [:type] ||= "text" super end |
#prepend(wrapper_options = nil) ⇒ Object
17 18 19 |
# File 'lib/simple_form/tailwind/inputs/prepend_string_input.rb', line 17 def prepend( = nil) template.content_tag(:span, [:prepend], class: "inline-flex items-center px-3 rounded-l-md border border-r-0 border-gray-300 bg-gray-50 text-gray-500 sm:text-sm") end |