(
({ items, activeId, variant = 'default', direction = 'vertical', showConnector = false, onDotClick, className, ...props }, ref) => {
const colors = variantColors[variant];
const containerClasses = `
fixed z-50 flex gap-6
${direction === 'vertical'
? 'right-8 top-1/2 -translate-y-1/2 flex-col'
: 'bottom-8 left-1/2 -translate-x-1/2 flex-row'
}
${className || ''}
`;
const handleClick = (id: string, href?: string) => {
if (onDotClick) onDotClick(id);
if (href) {
const el = document.querySelector(href);
el?.scrollIntoView({ behavior: 'smooth' });
}
};
return (
{items.map((item) => {
const isActive = activeId === item.id;
const dotSize = variant === 'minimal' ? 'w-2 h-2 border' : 'w-3 h-3 border-2';
return (
);
})}
);
}
);
ProgressDots.displayName = 'ProgressDots';
export default ProgressDots;