Class: PhlexKit::SidebarGroupAction
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::SidebarGroupAction
- Defined in:
- app/components/phlex_kit/sidebar/sidebar_group_action.rb
Overview
Action button pinned to the top-right of a SidebarGroup (the group is the positioning context), ported from shadcn/ui's SidebarGroupAction. See sidebar.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ SidebarGroupAction
constructor
A new instance of SidebarGroupAction.
- #view_template(&block) ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ SidebarGroupAction
Returns a new instance of SidebarGroupAction.
6 7 8 |
# File 'app/components/phlex_kit/sidebar/sidebar_group_action.rb', line 6 def initialize(**attrs) @attrs = attrs end |
Instance Method Details
#view_template(&block) ⇒ Object
10 11 12 |
# File 'app/components/phlex_kit/sidebar/sidebar_group_action.rb', line 10 def view_template(&block) (**mix({ class: "pk-sidebar-group-action", type: "button" }, @attrs), &block) end |