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
primer_view_components-0.7.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.7.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.6.3 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.6.0 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.5.1 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.5.0 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.4.0 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.3.1 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.3.0 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.2.0 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.1.9 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.1.8 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.1.7 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.1.6 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.1.5 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.1.4 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.1.3 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.1.2 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.1.1 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.1.0 previews/primer/alpha/image_crop_preview.rb