Sha256: b93befe7d9aa1aef26b1f76e4aa2778be6f1ec40b84e1fb828b643a9a30eba72

Contents?: true

Size: 698 Bytes

Versions: 60

Compression:

Stored size: 698 Bytes

Contents

# frozen_string_literal: true

require 'view_component'

class Proscenium::ViewComponent < ViewComponent::Base
  extend ActiveSupport::Autoload

  autoload :Sideload
  autoload :ReactComponent
  autoload :CssModules

  include Proscenium::SourcePath
  include CssModules

  module Sideload
    def before_render
      Proscenium::SideLoad.sideload_inheritance_chain self, controller.sideload_assets_options

      super
    end
  end

  class_attribute :sideload_assets_options

  class << self
    attr_accessor :abstract_class

    def inherited(child)
      child.prepend Sideload

      super
    end

    def sideload_assets(value)
      self.sideload_assets_options = value
    end
  end
end

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
proscenium-0.19.0.beta4-x86_64-linux lib/proscenium/view_component.rb
proscenium-0.19.0.beta4-aarch64-linux lib/proscenium/view_component.rb
proscenium-0.19.0.beta4-arm64-darwin lib/proscenium/view_component.rb
proscenium-0.19.0.beta4-x86_64-darwin lib/proscenium/view_component.rb
proscenium-0.19.0.beta4 lib/proscenium/view_component.rb
proscenium-0.19.0.beta3-x86_64-linux lib/proscenium/view_component.rb
proscenium-0.19.0.beta3-aarch64-linux lib/proscenium/view_component.rb
proscenium-0.19.0.beta3-arm64-darwin lib/proscenium/view_component.rb
proscenium-0.19.0.beta3-x86_64-darwin lib/proscenium/view_component.rb
proscenium-0.19.0.beta3 lib/proscenium/view_component.rb
proscenium-0.19.0.beta2-x86_64-linux lib/proscenium/view_component.rb
proscenium-0.19.0.beta2-aarch64-linux lib/proscenium/view_component.rb
proscenium-0.19.0.beta2-arm64-darwin lib/proscenium/view_component.rb
proscenium-0.19.0.beta2-x86_64-darwin lib/proscenium/view_component.rb
proscenium-0.19.0.beta2 lib/proscenium/view_component.rb
proscenium-0.19.0.beta1-x86_64-linux lib/proscenium/view_component.rb
proscenium-0.19.0.beta1-aarch64-linux lib/proscenium/view_component.rb
proscenium-0.19.0.beta1-arm64-darwin lib/proscenium/view_component.rb
proscenium-0.19.0.beta1-x86_64-darwin lib/proscenium/view_component.rb
proscenium-0.19.0.beta1 lib/proscenium/view_component.rb