# typed: false # frozen_string_literal: true module Ariadne module UI module List module Item class Component < Ariadne::BaseComponent option :as_menu, default: proc { false } accepts_html_attributes do |html_attrs| html_attrs[:class] = Ariadne::ViewComponents.tailwind_merger.merge([style(:item), html_attrs[:class]].join(" ")) html_attrs[:data] ||= {} html_attrs[:data] = { "#{stimulus_name}-target": "searchString", }.merge(html_attrs[:data]) end style :item do base do [ # "ariadne-gap-0.5", "ariadne-items-center", "ariadne-rounded", "!ariadne-ring-0", "ariadne-cursor-default", "ariadne-select-none", "ariadne-items-center", "ariadne-rounded-sm", "ariadne-px-2", # "ariadne-py-1.5", "ariadne-text-sm", "ariadne-outline-none", "ariadne-transition-colors", "disabled:ariadne-pointer-events-none", "disabled:ariadne-opacity-50", ].concat(Ariadne::UI::List::Component::SHARED_BACKGROUND_COLORS) end end end end end end end