Class: Shadcn::ScrollAreaComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Shadcn::ScrollAreaComponent
- Defined in:
- app/components/shadcn/scroll_area_component.rb
Overview
Scroll Area component for custom scrollbars Matches shadcn/ui ScrollArea component Uses Stimulus for interactivity
Constant Summary collapse
- BASE_CLASSES =
"relative overflow-hidden"- VIEWPORT_CLASSES =
"h-full w-full rounded-[inherit]"- SCROLLBAR_CLASSES =
"flex touch-none select-none transition-colors"- THUMB_CLASSES =
"relative flex-1 rounded-full bg-border"
Instance Attribute Summary
Attributes inherited from BaseComponent
#class_name, #data, #html_options
Instance Method Summary collapse
-
#initialize(orientation: :vertical, type: :hover, **options) ⇒ ScrollAreaComponent
constructor
A new instance of ScrollAreaComponent.
Methods inherited from BaseComponent
Methods included from Rails::Helpers::ClassNameHelper
Constructor Details
#initialize(orientation: :vertical, type: :hover, **options) ⇒ ScrollAreaComponent
Returns a new instance of ScrollAreaComponent.
30 31 32 33 34 |
# File 'app/components/shadcn/scroll_area_component.rb', line 30 def initialize(orientation: :vertical, type: :hover, **) super(**) @orientation = orientation.to_sym @type = type.to_sym end |