Class: PhlexKit::CommandDialog

Inherits:
BaseComponent show all
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

Methods inherited from BaseComponent

#on

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_templateObject



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