Class: Avo::Show::FieldWrapperComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/avo/show/field_wrapper_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(field: nil, resource: nil, dash_if_blank: true, full_width: false, **args) ⇒ FieldWrapperComponent

Returns a new instance of FieldWrapperComponent.



4
5
6
7
8
9
10
11
# File 'app/components/avo/show/field_wrapper_component.rb', line 4

def initialize(field: nil, resource: nil, dash_if_blank: true, full_width: false, **args)
  @field = field
  @resource = resource
  @dash_if_blank = dash_if_blank
  @classes = args[:class].present? ? args[:class] : ""
  @args = args
  @full_width = full_width
end