Class: PhlexKit::SidebarMenuSub
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::SidebarMenuSub
- Defined in:
- app/components/phlex_kit/sidebar/sidebar_menu_sub.rb
Overview
Nested submenu list under a SidebarMenuItem, ported from shadcn/ui's SidebarMenuSub. See sidebar.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ SidebarMenuSub
constructor
A new instance of SidebarMenuSub.
- #view_template(&block) ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ SidebarMenuSub
Returns a new instance of SidebarMenuSub.
5 6 7 |
# File 'app/components/phlex_kit/sidebar/sidebar_menu_sub.rb', line 5 def initialize(**attrs) @attrs = attrs end |
Instance Method Details
#view_template(&block) ⇒ Object
9 10 11 |
# File 'app/components/phlex_kit/sidebar/sidebar_menu_sub.rb', line 9 def view_template(&block) ul(**mix({ class: "pk-sidebar-menu-sub" }, @attrs), &block) end |