Class: SimpleForm::Tailwind::Inputs::PasswordInput
- Inherits:
-
Inputs::PasswordInput
- Object
- Inputs::PasswordInput
- SimpleForm::Tailwind::Inputs::PasswordInput
- Includes:
- OverwriteClassWithErrorOrValidClass
- Defined in:
- lib/simple_form/tailwind/inputs/password_input.rb
Instance Method Summary collapse
Methods included from OverwriteClassWithErrorOrValidClass
Instance Method Details
#input(*args, &blk) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/simple_form/tailwind/inputs/password_input.rb', line 8 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 |