Sha256: b847f38fde7ed6bbcccf70fa7f91ff8450d18cf2d2be97fd05d943400f4193aa

Contents?: true

Size: 631 Bytes

Versions: 72

Compression:

Stored size: 631 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: {}, label: nil, help: nil, **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
    @label = label
    @help = help
  end

  def help
    @help || @field.help
  end
end

Version data entries

72 entries across 72 versions & 1 rubygems

Version Path
avo-2.16.0 app/components/avo/edit/field_wrapper_component.rb
avo-2.15.3 app/components/avo/edit/field_wrapper_component.rb
avo-2.15.3.pre.1.data.attrs.to.sidebar.items app/components/avo/edit/field_wrapper_component.rb
avo-2.15.2 app/components/avo/edit/field_wrapper_component.rb
avo-2.15.2.pre.1 app/components/avo/edit/field_wrapper_component.rb
avo-2.15.1 app/components/avo/edit/field_wrapper_component.rb
avo-2.15.0 app/components/avo/edit/field_wrapper_component.rb
avo-2.14.3.pre.7.polytranslations1 app/components/avo/edit/field_wrapper_component.rb
avo-2.14.3.pre.6.nosprockets app/components/avo/edit/field_wrapper_component.rb
avo-2.14.3.pre.5.nosprockets app/components/avo/edit/field_wrapper_component.rb
avo-2.14.3.pre.4.tosqlfix app/components/avo/edit/field_wrapper_component.rb
avo-2.14.3.pre.3.jsbundling app/components/avo/edit/field_wrapper_component.rb
avo-2.14.3.pre.2.tailwindcss app/components/avo/edit/field_wrapper_component.rb
avo-2.14.3.pre.1.branding app/components/avo/edit/field_wrapper_component.rb
avo-2.14.2 app/components/avo/edit/field_wrapper_component.rb
avo-2.14.2.pre.1 app/components/avo/edit/field_wrapper_component.rb
avo-2.14.1 app/components/avo/edit/field_wrapper_component.rb
avo-2.14.1.pre.1 app/components/avo/edit/field_wrapper_component.rb
avo-2.14.0 app/components/avo/edit/field_wrapper_component.rb
avo-2.13.6.pre.2 app/components/avo/edit/field_wrapper_component.rb