Sha256: 22c9bc96e4da13824e03d03ab365573ab600705d82317090aca9d4094216e0ae

Contents?: true

Size: 1.48 KB

Versions: 113

Compression:

Stored size: 1.48 KB

Contents

# frozen_string_literal: true

module Primer
  module Beta
    # @component Primer::Beta::AutoComplete::Item
    # @label AutoCompleteItem
    class AutoCompleteItemPreview < ViewComponent::Preview
      # @label Playground
      # @param selected toggle
      # @param disabled toggle
      # @param value text
      def playground(value: "", selected: false, disabled: false)
        render_with_template(
          locals: {
            selected: selected,
            disabled: disabled,
            value: value
          }
        )
      end

      # @label Default
      # @param selected toggle
      # @param disabled toggle
      # @param value text
      # @snapshot
      def default(value: "", selected: false, disabled: false)
        render_with_template(
          locals: {
            selected: selected,
            disabled: disabled,
            value: value
          }
        )
      end

      # @label WithDescription
      # @param description_variant select [block, inline]
      # @param selected toggle
      # @param disabled toggle
      # @param value text
      # @snapshot
      def with_description(description_variant: "block", value: "", selected: false, disabled: false)
        description_variant = description_variant.to_sym

        render_with_template(
          locals: {
            description_variant: description_variant,
            selected: selected,
            disabled: disabled,
            value: value
          }
        )
      end
    end
  end
end

Version data entries

113 entries across 113 versions & 2 rubygems

Version Path
primer_view_components-0.22.0 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.21.1 previews/primer/beta/auto_complete_item_preview.rb
openproject-primer_view_components-0.25.0 previews/primer/beta/auto_complete_item_preview.rb
openproject-primer_view_components-0.24.0 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.21.0 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.20.1 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.20.0 previews/primer/beta/auto_complete_item_preview.rb
openproject-primer_view_components-0.23.0 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.19.0 previews/primer/beta/auto_complete_item_preview.rb
openproject-primer_view_components-0.22.2 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.18.2 previews/primer/beta/auto_complete_item_preview.rb
openproject-primer_view_components-0.22.1 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.18.1 previews/primer/beta/auto_complete_item_preview.rb
openproject-primer_view_components-0.22.0 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.18.0 previews/primer/beta/auto_complete_item_preview.rb
openproject-primer_view_components-0.21.0 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.17.0 previews/primer/beta/auto_complete_item_preview.rb
openproject-primer_view_components-0.20.0 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.16.1 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.16.0 previews/primer/beta/auto_complete_item_preview.rb