Class: StimulusPlumbers::Components::InputGroup

Inherits:
Plumber::Base show all
Defined in:
lib/stimulus_plumbers/components/input_group.rb

Instance Attribute Summary

Attributes inherited from Plumber::Base

#template

Instance Method Summary collapse

Methods inherited from Plumber::Base

#initialize, #theme

Methods included from Plumber::Renderer

#set_slots, #slot_block_for, #slot_kwargs_for, #slot_renderable?

Methods included from Plumber::Options::Aria

#labelled_aria

Methods included from Plumber::Options::Html

#merge_html_options

Constructor Details

This class inherits a constructor from StimulusPlumbers::Plumber::Base

Instance Method Details

#render(leading: nil, trailing: nil, error: false, **kwargs, &block) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/stimulus_plumbers/components/input_group.rb', line 6

def render(leading: nil, trailing: nil, error: false, **kwargs, &block)
  html_options = merge_html_options(
    theme.resolve(:input_group, error: error),
    kwargs
  )
  template.(:div, **html_options) do
    build_input_group(leading, trailing, &block)
  end
end