Sha256: f1bc820080fe15a3070cb7caceef2da55002e7bda16f18d99b2bea9630192123

Contents?: true

Size: 607 Bytes

Versions: 10

Compression:

Stored size: 607 Bytes

Contents

# frozen_string_literal: true

module Blacklight
  # Shim to support ViewComponent v2 slots using the content_areas API for backwards compatibility
  module ContentAreasShim
    # Shim the `with` helper to write content into slots instead
    def with(slot_name, *args, **kwargs, &block)
      Deprecation.warn(Blacklight::ContentAreasShim,
                       'ViewComponents deprecated `with` and it will be removed in ViewComponents 3.0. content_areas. Use slots (https://viewcomponent.org/guide/slots.html) instead.')
      public_send("with_#{slot_name}", *args, **kwargs, &block)
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
blacklight-7.40.0 app/components/blacklight/content_areas_shim.rb
blacklight-7.39.0 app/components/blacklight/content_areas_shim.rb
blacklight-7.38.0 app/components/blacklight/content_areas_shim.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-7.37.0/app/components/blacklight/content_areas_shim.rb
blacklight-7.37.0 app/components/blacklight/content_areas_shim.rb
blacklight-7.36.2 app/components/blacklight/content_areas_shim.rb
blacklight-7.36.1 app/components/blacklight/content_areas_shim.rb
blacklight-7.36.0 app/components/blacklight/content_areas_shim.rb
blacklight-7.35.0 app/components/blacklight/content_areas_shim.rb
blacklight-7.34.0 app/components/blacklight/content_areas_shim.rb