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.20.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.23.0 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.19.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.22.2 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.18.2 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.22.1 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.18.1 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.22.0 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.18.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.21.0 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.17.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.20.0 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.16.1 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.16.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.19.0 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.15.1 previews/primer/alpha/image_crop_preview.rb
primer_view_components-0.15.0 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.18.1 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.17.1 previews/primer/alpha/image_crop_preview.rb
openproject-primer_view_components-0.17.0 previews/primer/alpha/image_crop_preview.rb