Class: Shadcn::CommandListComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/shadcn/command_list_component.rb

Overview

Command List component - container for command groups and items

Constant Summary collapse

BASE_CLASSES =
"max-h-[300px] overflow-y-auto overflow-x-hidden"

Instance Attribute Summary

Attributes inherited from BaseComponent

#class_name, #data, #html_options

Instance Method Summary collapse

Methods inherited from BaseComponent

#content, #initialize

Methods included from Rails::Helpers::ClassNameHelper

#cn

Constructor Details

This class inherits a constructor from Shadcn::BaseComponent

Instance Method Details

#callObject



35
36
37
# File 'app/components/shadcn/command_list_component.rb', line 35

def call
  (:div, list_content, class: merge_classes(BASE_CLASSES), data: { "shadcn--command-target": "list" }, **html_options.merge(build_data))
end