Class: Avo::Fields::Common::SingleFileViewerComponent

Inherits:
ViewComponent::Base
  • Object
show all
Includes:
ApplicationHelper
Defined in:
app/components/avo/fields/common/single_file_viewer_component.rb

Instance Method Summary collapse

Methods included from ApplicationHelper

#a_button, #a_link, #button_classes, #empty_state, #get_model_class, #input_classes, #render_license_warning, #render_license_warnings, #svg, #turbo_frame_wrap

Constructor Details

#initialize(id:, file:, is_image:, direct_upload: false, resource:, button_size: :md) ⇒ SingleFileViewerComponent

Returns a new instance of SingleFileViewerComponent.



6
7
8
9
10
11
12
13
# File 'app/components/avo/fields/common/single_file_viewer_component.rb', line 6

def initialize(id:, file:, is_image:, direct_upload: false, resource:, button_size: :md)
  @id = id
  @file = file
  @is_image = is_image
  @direct_upload = direct_upload
  @button_size = button_size
  @resource = resource
end