refactor(shared): move shared ui components to share/view/ui without subfolders

This commit is contained in:
Haileyesus
2026-03-02 16:52:09 +03:00
parent 324ab42928
commit 1e01fa07e0
13 changed files with 12 additions and 20 deletions

View File

@@ -0,0 +1,26 @@
import * as React from 'react';
import { cn } from '../../../lib/utils';
type ScrollAreaProps = React.HTMLAttributes<HTMLDivElement>;
const ScrollArea = React.forwardRef<HTMLDivElement, ScrollAreaProps>(
({ className, children, ...props }, ref) => (
<div className={cn(className, 'relative overflow-hidden')} {...props}>
{/* Inner container keeps border radius while allowing momentum scrolling on touch devices. */}
<div
ref={ref}
className="h-full w-full rounded-[inherit] overflow-auto"
style={{
WebkitOverflowScrolling: 'touch',
touchAction: 'pan-y',
}}
>
{children}
</div>
</div>
)
);
ScrollArea.displayName = 'ScrollArea';
export { ScrollArea };