{
(containerRef as React.MutableRefObject
).current = node;
if (typeof ref === 'function') ref(node);
else if (ref) ref.current = node;
}}
className={`
w-full overflow-x-auto overflow-y-hidden snap-x snap-mandatory scroll-smooth
scrollbar-thin scrollbar-track-black/30 ${colors.scrollbar}
${fadeEdges ? '[mask-image:linear-gradient(90deg,transparent_0%,black_5%,black_95%,transparent_100%)]' : ''}
`}
{...props}
>
{Array.isArray(children)
? children.map((child, i) => (
{child}
))
:
{children}
}
{showIndicators && panelCount > 1 && (
{Array.from({ length: panelCount }).map((_, i) => (
)}
);
}
);
HorizontalScroll.displayName = 'HorizontalScroll';
export default HorizontalScroll;