Class: SimpleForm::Tailwind::Inputs::StringInput
- Inherits:
-
Inputs::StringInput
- Object
- Inputs::StringInput
- SimpleForm::Tailwind::Inputs::StringInput
- Includes:
- OverwriteClassWithErrorOrValidClass
- Defined in:
- lib/simple_form/tailwind/inputs/string_input.rb
Instance Method Summary collapse
Methods included from OverwriteClassWithErrorOrValidClass
Instance Method Details
#input(*args, &blk) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/simple_form/tailwind/inputs/string_input.rb', line 11 def input(*args, &blk) if has_errors? template.content_tag(:div, ( super + ( template.content_tag( :div, template.heroicon("exclamation-circle", options: { class: "h-5 w-5 text-red-500" }), class: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none" ) ) ), class: "mt-1 relative rounded-md shadow-sm") else template.content_tag(:div, super, class: "mt-1") end end |