Class: FoxTail::DropzoneComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- Base
- BaseComponent
- FoxTail::DropzoneComponent
- Defined in:
- app/components/fox_tail/dropzone_component.rb
Constant Summary collapse
- DEFAULT_ICON =
"cloud-arrow-up"
Instance Attribute Summary
Attributes inherited from BaseComponent
Instance Method Summary collapse
Methods inherited from BaseComponent
classname_merger, #initialize, stimulus_merger, use_stimulus?, #with_html_attributes, #with_html_class
Methods inherited from Base
Constructor Details
This class inherits a constructor from FoxTail::BaseComponent
Instance Method Details
#before_render ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'app/components/fox_tail/dropzone_component.rb', line 27 def before_render super with_icon DEFAULT_ICON, variant: :outline unless icon? with_title I18n.t("components.fox_tail.dropzone.title_html").html_safe unless title? html_attributes[:type] = :file html_attributes[:class] = theme.apply(:root, self) end |