Class: PhlexKit::CommandDialog
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::CommandDialog
- Defined in:
- app/components/phlex_kit/command/command_dialog.rb
Overview
Wrapper wiring a CommandDialogTrigger to its CommandDialogContent. The outlet selector finds the live palette instance (if already open) so a second trigger press just refocuses the input. See command.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ CommandDialog
constructor
A new instance of CommandDialog.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ CommandDialog
Returns a new instance of CommandDialog.
6 7 8 |
# File 'app/components/phlex_kit/command/command_dialog.rb', line 6 def initialize(**attrs) @attrs = attrs end |
Instance Method Details
#view_template ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'app/components/phlex_kit/command/command_dialog.rb', line 10 def view_template(&) div(**mix({ data: { controller: "phlex-kit--command-dialog", phlex_kit__command_dialog_phlex_kit__command_outlet: "[data-phlex-kit--command-dialog-instance]" } }, @attrs), &) end |