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 controller tracks its own live clone (sheet pattern) so a second trigger press just refocuses the input — per instance, unlike the old document-scoped outlet selector, which let one dialog adopt another's open palette. 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.
8 9 10 |
# File 'app/components/phlex_kit/command/command_dialog.rb', line 8 def initialize(**attrs) @attrs = attrs end |
Instance Method Details
#view_template ⇒ Object
12 13 14 15 16 |
# File 'app/components/phlex_kit/command/command_dialog.rb', line 12 def view_template(&) div(**mix({ data: { controller: "phlex-kit--command-dialog" } }, @attrs), &) end |