Class: PhlexKit::MenubarGroup
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::MenubarGroup
- Defined in:
- app/components/phlex_kit/menubar/menubar_group.rb
Overview
Grouping wrapper for related rows. Mirrors shadcn/ui's MenubarGroup. See menubar.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ MenubarGroup
constructor
A new instance of MenubarGroup.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ MenubarGroup
Returns a new instance of MenubarGroup.
5 |
# File 'app/components/phlex_kit/menubar/menubar_group.rb', line 5 def initialize(**attrs) = (@attrs = attrs) |
Instance Method Details
#view_template ⇒ Object
6 7 8 9 10 11 |
# File 'app/components/phlex_kit/menubar/menubar_group.rb', line 6 def view_template(&) base = { class: "pk-menubar-group" } # Default only when the caller didn't supply their own — `mix` fuses. base[:role] = "group" unless attr_set?(:role) div(**mix(base, @attrs), &) end |