Class: SimpleForm::Tailwind::Inputs::AppendStringInput

Inherits:
Inputs::StringInput
  • Object
show all
Includes:
OverwriteClassWithErrorOrValidClass
Defined in:
lib/simple_form/tailwind/inputs/append_string_input.rb

Instance Method Summary collapse

Methods included from OverwriteClassWithErrorOrValidClass

#set_input_classes

Instance Method Details

#append(wrapper_options = nil) ⇒ Object



17
18
19
# File 'lib/simple_form/tailwind/inputs/append_string_input.rb', line 17

def append(wrapper_options = nil)
  template.(:span, options[:append], class: "inline-flex items-center px-3 rounded-r-md border border-l-0 border-gray-300 bg-gray-50 text-gray-500 sm:text-sm")
end

#input(*args, &blk) ⇒ Object



11
12
13
14
15
# File 'lib/simple_form/tailwind/inputs/append_string_input.rb', line 11

def input(*args, &blk)
  input_html_options[:type] ||= "text"

  super
end