Class: FoxTail::InputGroupComponent
- Inherits:
-
BaseComponent
show all
- Includes:
- Concerns::Formable
- Defined in:
- app/components/fox_tail/input_group_component.rb
Instance Attribute Summary
#html_attributes
Instance Method Summary
collapse
classname_merger, #initialize, stimulus_merger, use_stimulus?, #with_html_attributes, #with_html_class
Methods inherited from Base
fox_tail_config
Instance Method Details
#before_render ⇒ Object
106
107
108
109
110
|
# File 'app/components/fox_tail/input_group_component.rb', line 106
def before_render
super
html_attributes[:class] = classnames theme.apply(:root, self), html_class
end
|
#call ⇒ Object
112
113
114
115
116
117
|
# File 'app/components/fox_tail/input_group_component.rb', line 112
def call
content_tag :div, html_attributes do
items.each_with_index { |item, index| concat render_item(item, index) }
concat content
end
end
|
#render? ⇒ Boolean
102
103
104
|
# File 'app/components/fox_tail/input_group_component.rb', line 102
def render?
items?
end
|