Sha256: c06645e66a46e0c02722fec6a0efe9c59cdb38d59c52baec06c4033aafdce78d
Contents?: true
Size: 610 Bytes
Versions: 9
Compression:
Stored size: 610 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 or @displayed_in_modal @classes += ' border-t' end end end
Version data entries
9 entries across 9 versions & 1 rubygems