Sha256: 8d559a40d08a55b4d55b25a378327062b4481192eb78585e603670377280f2eb

Contents?: true

Size: 690 Bytes

Versions: 9

Compression:

Stored size: 690 Bytes

Contents

# frozen_string_literal: true

require "active_support/concern"

module ViewComponent # :nodoc:
  module Previewable
    extend ActiveSupport::Concern

    included do
      # Set the location of component previews through app configuration:
      #
      #     config.view_component.preview_path = "#{Rails.root}/lib/component_previews"
      #
      mattr_accessor :preview_path, instance_writer: false

      # Enable or disable component previews through app configuration:
      #
      #     config.view_component.show_previews = true
      #
      # Defaults to +true+ for development environment
      #
      mattr_accessor :show_previews, instance_writer: false
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
view_component-2.5.1 lib/view_component/previewable.rb
view_component-2.5.0 lib/view_component/previewable.rb
view_component-2.4.0 lib/view_component/previewable.rb
view_component-2.3.0 lib/view_component/previewable.rb
view_component-2.2.2 lib/view_component/previewable.rb
view_component-2.2.1 lib/view_component/previewable.rb
view_component-2.2.0 lib/view_component/previewable.rb
view_component-2.1.0 lib/view_component/previewable.rb
view_component-2.0.0 lib/view_component/previewable.rb