Class: Forms::Plain::WrappedInput

Inherits:
WrappedInput
  • Object
show all
Defined in:
lib/forms/plain/wrapped_input.rb

Overview

The icon/text-inside-the-field pattern without daisyui: a bare

Instance Method Summary collapse

Instance Method Details

#view_template(&leading) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/forms/plain/wrapped_input.rb', line 8

def view_template(&leading)
  label do
    leading&.call
    input(**plain_input_attributes)
    render_trailing
  end
end