Class: Shadcn::CommandDialogComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Shadcn::CommandDialogComponent
- Defined in:
- app/components/shadcn/command_dialog_component.rb
Overview
Command Dialog component - command palette in a modal dialog Combines Dialog and Command components
Constant Summary collapse
- OVERLAY_CLASSES =
"fixed inset-0 z-50 bg-black/80"- CONTENT_CLASSES =
"fixed left-[50%] top-[50%] z-50 translate-x-[-50%] translate-y-[-50%] shadow-lg"- COMMAND_CLASSES =
"[&_[data-shadcn--command-target='input']]:h-12"
Instance Attribute Summary
Attributes inherited from BaseComponent
#class_name, #data, #html_options
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(shortcut: nil, **options) ⇒ CommandDialogComponent
constructor
A new instance of CommandDialogComponent.
Methods inherited from BaseComponent
Methods included from Rails::Helpers::ClassNameHelper
Constructor Details
#initialize(shortcut: nil, **options) ⇒ CommandDialogComponent
Returns a new instance of CommandDialogComponent.
39 40 41 42 |
# File 'app/components/shadcn/command_dialog_component.rb', line 39 def initialize(shortcut: nil, **) super(**) @shortcut = shortcut end |
Instance Method Details
#call ⇒ Object
44 45 46 |
# File 'app/components/shadcn/command_dialog_component.rb', line 44 def call content_tag(:div, dialog_content, **dialog_attributes) end |