Class: PhlexUI::Command::DialogTrigger
- Defined in:
- lib/phlex_ui/command/dialog_trigger.rb
Constant Summary collapse
- DEFAULT_KEYBINDINGS =
[ "keydown.ctrl+k@window", "keydown.meta+k@window" ].freeze
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(keybindings: DEFAULT_KEYBINDINGS, **attrs) ⇒ DialogTrigger
constructor
A new instance of DialogTrigger.
- #view_template ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(keybindings: DEFAULT_KEYBINDINGS, **attrs) ⇒ DialogTrigger
Returns a new instance of DialogTrigger.
10 11 12 13 |
# File 'lib/phlex_ui/command/dialog_trigger.rb', line 10 def initialize(keybindings: DEFAULT_KEYBINDINGS, **attrs) @keybindings = keybindings.map { |kb| "#{kb}->dialog#open" } super(**attrs) end |
Instance Method Details
#view_template ⇒ Object
15 16 17 |
# File 'lib/phlex_ui/command/dialog_trigger.rb', line 15 def view_template(&) div(**attrs, &) end |