Sha256: 2bb6d6926bd9d728c5efc757354379bee44a2c21f6d020a782e775d18806b024

Contents?: true

Size: 1.39 KB

Versions: 2

Compression:

Stored size: 1.39 KB

Contents

# frozen_string_literal: true

module Yattho
  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

2 entries across 2 versions & 1 rubygems

Version Path
yattho_view_components-0.1.1 previews/yattho/beta/auto_complete_item_preview.rb
yattho_view_components-0.0.1 previews/yattho/beta/auto_complete_item_preview.rb