Sha256: 5ccfe3f1b247dfb04e044fd54c22da0d6a4da6cde47f5a5f1fa3ce2da931621e

Contents?: true

Size: 584 Bytes

Versions: 7

Compression:

Stored size: 584 Bytes

Contents

# frozen_string_literal: true

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

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
primer_view_components-0.0.104 previews/primer/image_crop_preview.rb
primer_view_components-0.0.103 previews/primer/image_crop_preview.rb
primer_view_components-0.0.102 previews/primer/image_crop_preview.rb
primer_view_components-0.0.101 previews/primer/image_crop_preview.rb
primer_view_components-0.0.100 previews/primer/image_crop_preview.rb
primer_view_components-0.0.99 previews/primer/image_crop_preview.rb
primer_view_components-0.0.98 previews/primer/image_crop_preview.rb