{
(containerRef as React.MutableRefObject
).current = node;
if (typeof ref === 'function') ref(node);
else if (ref) ref.current = node;
}}
className={`${styles.container} ${styles[variant]} ${fadeEdges ? styles.fadeEdges : ''}`}
style={{ '--panel-gap': `${gap}rem`, ...style } as React.CSSProperties}
{...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;