Sha256: 1c0bcb8ace9325fa48ada6b9073bd1a8fc4a7816f7c746fbc059c5b14fdbc58a

Contents?: true

Size: 703 Bytes

Versions: 125

Compression:

Stored size: 703 Bytes

Contents

# frozen_string_literal: true

module Primer
  # @label Box
  class BoxPreview < ViewComponent::Preview
    # @label Playground
    #
    # @param content [String] text
    def playground(content: "Playground")
      render(Primer::Box.new) { content }
    end

    # @label Default
    def default(content: "Default")
      render(Primer::Box.new) { content }
    end

    # @label Border
    # @snapshot
    def border(content: "Box with border")
      render(Primer::Box.new(border: true, p: 3)) { content }
    end

    # @label Border Bottom
    # @snapshot
    def border_bottom(content: "Box with bottom border")
      render(Primer::Box.new(border: :bottom, p: 3)) { content }
    end
  end
end

Version data entries

125 entries across 125 versions & 2 rubygems

Version Path
primer_view_components-0.36.5 previews/primer/box_preview.rb
openproject-primer_view_components-0.52.2 previews/primer/box_preview.rb
primer_view_components-0.36.4 previews/primer/box_preview.rb
openproject-primer_view_components-0.52.1 previews/primer/box_preview.rb
openproject-primer_view_components-0.52.0 previews/primer/box_preview.rb
primer_view_components-0.36.3 previews/primer/box_preview.rb
openproject-primer_view_components-0.51.0 previews/primer/box_preview.rb
primer_view_components-0.36.2 previews/primer/box_preview.rb
openproject-primer_view_components-0.50.1 previews/primer/box_preview.rb
openproject-primer_view_components-0.50.0 previews/primer/box_preview.rb
primer_view_components-0.36.1 previews/primer/box_preview.rb
primer_view_components-0.36.0 previews/primer/box_preview.rb
openproject-primer_view_components-0.49.2 previews/primer/box_preview.rb
primer_view_components-0.35.2 previews/primer/box_preview.rb
openproject-primer_view_components-0.49.1 previews/primer/box_preview.rb
openproject-primer_view_components-0.49.0 previews/primer/box_preview.rb
primer_view_components-0.35.1 previews/primer/box_preview.rb
primer_view_components-0.35.0 previews/primer/box_preview.rb
openproject-primer_view_components-0.48.2 previews/primer/box_preview.rb
openproject-primer_view_components-0.48.1 previews/primer/box_preview.rb