Sha256: 9d07c67041a0db9cd69564cd22b20ae1c19b920161955f8319c87971a42e9229

Contents?: true

Size: 1.39 KB

Versions: 24

Compression:

Stored size: 1.39 KB

Contents

# frozen_string_literal: true

module Primer
  module Beta
    # @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
      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
      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

24 entries across 24 versions & 1 rubygems

Version Path
primer_view_components-0.1.4 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.1.3 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.1.2 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.1.1 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.1.0 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.0.123 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.0.122 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.0.121 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.0.120 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.0.119 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.0.118 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.0.117 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.0.116 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.0.115 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.0.114 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.0.113 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.0.112 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.0.111 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.0.110 previews/primer/beta/auto_complete_item_preview.rb
primer_view_components-0.0.109 previews/primer/beta/auto_complete_item_preview.rb