Sha256: fcbc02c82601fd9cc570831831e87b6e22f2360e074636f67fb010f43c02b8e2

Contents?: true

Size: 1.03 KB

Versions: 7

Compression:

Stored size: 1.03 KB

Contents

# frozen_string_literal: true

module Primer
  # @label PopoverComponent
  class PopoverComponentPreview < ViewComponent::Preview
    # @label Playground
    #
    # @param caret [Symbol] select [top, right, bottom, left, top_right, top_left, bottom_right, bottom_left, left_bottom, left_top, right_bottom, right_top]
    def playground(caret: :top)
      render Primer::PopoverComponent.new do |component|
        component.with_heading do
          "Activity feed"
        end
        component.with_body(caret: caret) do
          "This is the Popover body."
        end
      end
    end

    # @label Default
    #
    # @param caret [Symbol] select [top, right, bottom, left, top_right, top_left, bottom_right, bottom_left, left_bottom, left_top, right_bottom, right_top]
    def default(caret: :top)
      render Primer::PopoverComponent.new do |component|
        component.with_heading do
          "Activity feed"
        end
        component.with_body(caret: caret) do
          "This is the Popover body."
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
primer_view_components-0.0.111 previews/primer/popover_component_preview.rb
primer_view_components-0.0.110 previews/primer/popover_component_preview.rb
primer_view_components-0.0.109 previews/primer/popover_component_preview.rb
primer_view_components-0.0.108 previews/primer/popover_component_preview.rb
primer_view_components-0.0.107 previews/primer/popover_component_preview.rb
primer_view_components-0.0.106 previews/primer/popover_component_preview.rb
primer_view_components-0.0.105 previews/primer/popover_component_preview.rb