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
openproject-primer_view_components-0.33.0 previews/primer/box_preview.rb
primer_view_components-0.25.1 previews/primer/box_preview.rb
openproject-primer_view_components-0.32.1 previews/primer/box_preview.rb
openproject-primer_view_components-0.32.0 previews/primer/box_preview.rb
openproject-primer_view_components-0.29.1 previews/primer/box_preview.rb
openproject-primer_view_components-0.29.0 previews/primer/box_preview.rb
primer_view_components-0.23.0 previews/primer/box_preview.rb
openproject-primer_view_components-0.28.1 previews/primer/box_preview.rb
openproject-primer_view_components-0.28.0 previews/primer/box_preview.rb
openproject-primer_view_components-0.27.0 previews/primer/box_preview.rb
openproject-primer_view_components-0.26.0 previews/primer/box_preview.rb
openproject-primer_view_components-0.25.1 previews/primer/box_preview.rb
primer_view_components-0.22.0 previews/primer/box_preview.rb
primer_view_components-0.21.1 previews/primer/box_preview.rb
openproject-primer_view_components-0.25.0 previews/primer/box_preview.rb
openproject-primer_view_components-0.24.0 previews/primer/box_preview.rb
primer_view_components-0.21.0 previews/primer/box_preview.rb
primer_view_components-0.20.1 previews/primer/box_preview.rb
primer_view_components-0.20.0 previews/primer/box_preview.rb
openproject-primer_view_components-0.23.0 previews/primer/box_preview.rb