Class: PhlexKit::CommandShortcut
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::CommandShortcut
- Defined in:
- app/components/phlex_kit/command/command_shortcut.rb
Overview
Right-aligned keyboard hint on a CommandItem, ported from shadcn/ui's CommandShortcut. See command.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ CommandShortcut
constructor
A new instance of CommandShortcut.
- #view_template(&block) ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ CommandShortcut
Returns a new instance of CommandShortcut.
5 6 7 |
# File 'app/components/phlex_kit/command/command_shortcut.rb', line 5 def initialize(**attrs) @attrs = attrs end |
Instance Method Details
#view_template(&block) ⇒ Object
9 10 11 |
# File 'app/components/phlex_kit/command/command_shortcut.rb', line 9 def view_template(&block) span(**mix({ class: "pk-command-shortcut" }, @attrs), &block) end |