Class: FoxTail::FileInputComponent

Inherits:
InputBaseComponent show all
Defined in:
app/components/fox_tail/file_input_component.rb

Instance Attribute Summary

Attributes inherited from BaseComponent

#html_attributes

Instance Method Summary collapse

Methods inherited from InputBaseComponent

stimulus_controller_name, #stimulus_controller_options, #use_stimulus?

Methods inherited from BaseComponent

classname_merger, #initialize, stimulus_merger, use_stimulus?, #with_html_attributes, #with_html_class

Methods inherited from Base

fox_tail_config

Constructor Details

This class inherits a constructor from FoxTail::BaseComponent

Instance Method Details

#before_renderObject



4
5
6
7
8
9
# File 'app/components/fox_tail/file_input_component.rb', line 4

def before_render
  super

  html_attributes[:class] = classnames theme.apply(:root, self), html_class
  html_attributes[:type] = :file
end

#callObject



11
12
13
# File 'app/components/fox_tail/file_input_component.rb', line 11

def call
  tag.input(html_attributes)
end