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.48.2 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.48.1 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.48.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.47.1 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.47.0 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.34.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.46.1 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.46.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.45.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.44.3 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.44.2 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.44.1 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.33.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.44.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.43.1 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.43.0 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.32.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.42.0 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.31.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.41.1 previews/primer/alpha/image_crop_preview.rb