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
openproject-primer_view_components-0.49.2 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.35.2 previews/primer/beta/auto_complete_item_preview.rb
openproject-primer_view_components-0.49.1 previews/primer/beta/auto_complete_item_preview.rb
openproject-primer_view_components-0.49.0 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.35.1 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.35.0 previews/primer/beta/auto_complete_item_preview.rb
openproject-primer_view_components-0.48.2 previews/primer/beta/auto_complete_item_preview.rb
openproject-primer_view_components-0.48.1 previews/primer/beta/auto_complete_item_preview.rb
openproject-primer_view_components-0.48.0 previews/primer/beta/auto_complete_item_preview.rb
openproject-primer_view_components-0.47.1 previews/primer/beta/auto_complete_item_preview.rb
openproject-primer_view_components-0.47.0 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.34.0 previews/primer/beta/auto_complete_item_preview.rb
openproject-primer_view_components-0.46.1 previews/primer/beta/auto_complete_item_preview.rb
openproject-primer_view_components-0.46.0 previews/primer/beta/auto_complete_item_preview.rb
openproject-primer_view_components-0.45.0 previews/primer/beta/auto_complete_item_preview.rb
openproject-primer_view_components-0.44.3 previews/primer/beta/auto_complete_item_preview.rb
openproject-primer_view_components-0.44.2 previews/primer/beta/auto_complete_item_preview.rb
openproject-primer_view_components-0.44.1 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.33.0 previews/primer/beta/auto_complete_item_preview.rb
openproject-primer_view_components-0.44.0 previews/primer/beta/auto_complete_item_preview.rb