Class: PhlexKit::DropdownMenuShortcut
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::DropdownMenuShortcut
- Defined in:
- app/components/phlex_kit/dropdown_menu/dropdown_menu_shortcut.rb
Overview
Right-aligned keyboard hint in a menu row. Ported from shadcn/ui's DropdownMenuShortcut. See dropdown_menu.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ DropdownMenuShortcut
constructor
A new instance of DropdownMenuShortcut.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ DropdownMenuShortcut
Returns a new instance of DropdownMenuShortcut.
5 |
# File 'app/components/phlex_kit/dropdown_menu/dropdown_menu_shortcut.rb', line 5 def initialize(**attrs) = (@attrs = attrs) |
Instance Method Details
#view_template ⇒ Object
6 7 8 |
# File 'app/components/phlex_kit/dropdown_menu/dropdown_menu_shortcut.rb', line 6 def view_template(&) span(**mix({ class: "pk-dropdown-menu-shortcut" }, @attrs), &) end |