Class: Shadcn::ResizableHandleComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Shadcn::ResizableHandleComponent
- Defined in:
- app/components/shadcn/resizable_handle_component.rb
Overview
Draggable handle between resizable panels
Constant Summary collapse
- HORIZONTAL_CLASSES =
"w-px bg-border cursor-col-resize hover:bg-primary/50 transition-colors"- VERTICAL_CLASSES =
"h-px bg-border cursor-row-resize hover:bg-primary/50 transition-colors"
Instance Attribute Summary
Attributes inherited from BaseComponent
#class_name, #data, #html_options
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(with_handle: false, direction: :horizontal, **options) ⇒ ResizableHandleComponent
constructor
A new instance of ResizableHandleComponent.
Methods inherited from BaseComponent
Methods included from Shadcn::Rails::Helpers::ClassNameHelper
Constructor Details
#initialize(with_handle: false, direction: :horizontal, **options) ⇒ ResizableHandleComponent
Returns a new instance of ResizableHandleComponent.
11 12 13 14 15 |
# File 'app/components/shadcn/resizable_handle_component.rb', line 11 def initialize(with_handle: false, direction: :horizontal, **) super(**) @with_handle = with_handle @direction = direction end |
Instance Method Details
#call ⇒ Object
17 18 19 |
# File 'app/components/shadcn/resizable_handle_component.rb', line 17 def call content_tag(:div, handle_content, handle_attributes) end |