Class: Shadcn::ResizablePanelComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/shadcn/resizable_panel_component.rb

Overview

Individual panel within a ResizablePanelGroup

Constant Summary collapse

BASE_CLASSES =
"relative"

Instance Attribute Summary

Attributes inherited from BaseComponent

#class_name, #data, #html_options

Instance Method Summary collapse

Methods inherited from BaseComponent

#content

Methods included from Shadcn::Rails::Helpers::ClassNameHelper

#cn

Constructor Details

#initialize(default_size: nil, min_size: nil, max_size: nil, direction: :horizontal, **options) ⇒ ResizablePanelComponent



12
13
14
15
16
17
18
# File 'app/components/shadcn/resizable_panel_component.rb', line 12

def initialize(default_size: nil, min_size: nil, max_size: nil, direction: :horizontal, **options)
  super(**options)
  @default_size = default_size
  @min_size = min_size
  @max_size = max_size
  @direction = direction
end

Instance Method Details

#callObject



20
21
22
# File 'app/components/shadcn/resizable_panel_component.rb', line 20

def call
  (:div, content, panel_attributes)
end