Sha256: 7402950153ebb25856c6ae5c5ce332ff03d59146973935df4af1f6659a0cde3e

Contents?: true

Size: 872 Bytes

Versions: 139

Compression:

Stored size: 872 Bytes

Contents

# frozen_string_literal: true

module Primer
  module Alpha
    # @label ImageCrop
    class ImageCropPreview < ViewComponent::Preview
      # @label Playground
      #
      # @param rounded [Boolean]
      def playground(rounded: false)
        render(Primer::Alpha::ImageCrop.new(src: Primer::ExampleImage::BASE64_SRC, rounded: rounded))
      end

      # @label Default Options
      #
      # @param rounded [Boolean]
      def default(rounded: false)
        render(Primer::Alpha::ImageCrop.new(src: Primer::ExampleImage::BASE64_SRC, rounded: rounded))
      end

      # @label Custom loading slot
      #
      # @param rounded [Boolean]
      def loading(rounded: false)
        render(Primer::Alpha::ImageCrop.new(src: Primer::ExampleImage::BASE64_SRC, rounded: rounded)) do |c|
          c.with_loading { "Loading..." }
        end
      end
    end
  end
end

Version data entries

139 entries across 139 versions & 2 rubygems

Version Path
openproject-primer_view_components-0.41.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.40.0 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.30.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.39.1 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.39.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.38.0 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.29.0 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.28.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.37.1 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.37.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.36.2 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.36.1 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.36.0 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.27.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.35.2 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.35.1 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.26.1 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.35.0 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.26.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.34.0 previews/primer/alpha/image_crop_preview.rb