Sha256: 9f84782563a3fb98a4894ea699f639a5f18382bcb9a4f129172bbc7e504dc5af

Contents?: true

Size: 612 Bytes

Versions: 55

Compression:

Stored size: 612 Bytes

Contents

# frozen_string_literal: true

class Avo::Edit::FieldWrapperComponent < ViewComponent::Base
  def initialize(field: nil, dash_if_blank: true, full_width: false, displayed_in_modal: false, form: nil, resource: {}, **args)
    @field = field
    @dash_if_blank = dash_if_blank
    @classes = args[:class].present? ? args[:class] : ""
    @args = args
    @displayed_in_modal = displayed_in_modal
    @form = form
    @resource = resource
    @model = resource.present? ? resource.model : nil
    @full_width = full_width

    if (@index != 0) || @displayed_in_modal
      @classes += " border-t"
    end
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
avo-1.6.4.pre.1 app/components/avo/edit/field_wrapper_component.rb
avo-1.6.3.pre.2 app/components/avo/edit/field_wrapper_component.rb
avo-1.6.3.pre.1 app/components/avo/edit/field_wrapper_component.rb
avo-1.6.2.pre.1 app/components/avo/edit/field_wrapper_component.rb
avo-1.6.1 app/components/avo/edit/field_wrapper_component.rb
avo-1.6.0 app/components/avo/edit/field_wrapper_component.rb
avo-1.5.5 app/components/avo/edit/field_wrapper_component.rb
avo-1.5.4 app/components/avo/edit/field_wrapper_component.rb
avo-1.5.3 app/components/avo/edit/field_wrapper_component.rb
avo-1.5.2 app/components/avo/edit/field_wrapper_component.rb
avo-1.5.1 app/components/avo/edit/field_wrapper_component.rb
avo-1.5.0 app/components/avo/edit/field_wrapper_component.rb
avo-1.4.5.pre.1 app/components/avo/edit/field_wrapper_component.rb
avo-1.4.4.pre.1 app/components/avo/edit/field_wrapper_component.rb
avo-1.4.4 app/components/avo/edit/field_wrapper_component.rb
avo-1.4.3 app/components/avo/edit/field_wrapper_component.rb
avo-1.4.2 app/components/avo/edit/field_wrapper_component.rb
avo-1.4.1 app/components/avo/edit/field_wrapper_component.rb
avo-1.4.0 app/components/avo/edit/field_wrapper_component.rb
avo-1.4.0.pre.1 app/components/avo/edit/field_wrapper_component.rb