Class: Shadcn::ResizablePanelGroupComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Shadcn::ResizablePanelGroupComponent
- Defined in:
- app/components/shadcn/resizable_panel_group_component.rb
Overview
ResizablePanelGroup component for creating resizable panel layouts Matches shadcn/ui Resizable component Uses Stimulus for interactivity
Constant Summary collapse
- DIRECTIONS =
{ horizontal: "flex h-full", vertical: "flex flex-col" }.freeze
Instance Attribute Summary
Attributes inherited from BaseComponent
#class_name, #data, #html_options
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(direction: :horizontal, auto_save_id: nil, **options) ⇒ ResizablePanelGroupComponent
constructor
A new instance of ResizablePanelGroupComponent.
Methods inherited from BaseComponent
Methods included from Shadcn::Rails::Helpers::ClassNameHelper
Constructor Details
#initialize(direction: :horizontal, auto_save_id: nil, **options) ⇒ ResizablePanelGroupComponent
Returns a new instance of ResizablePanelGroupComponent.
68 69 70 71 72 |
# File 'app/components/shadcn/resizable_panel_group_component.rb', line 68 def initialize(direction: :horizontal, auto_save_id: nil, **) super(**) @direction = direction.to_sym @auto_save_id = auto_save_id end |
Instance Method Details
#call ⇒ Object
74 75 76 |
# File 'app/components/shadcn/resizable_panel_group_component.rb', line 74 def call content_tag(:div, group_content, group_attributes) end |