Files
livedash-node/components/magicui/scroll-progress.tsx
Kaj Kowalski 2a033fe639 fix: improve dark mode compatibility and chart visibility
- Fix TopQuestionsChart with proper dark mode colors using CSS variables and shadcn/ui components
- Enhance ResponseTimeDistribution with thicker bars (maxBarSize: 60)
- Replace GeographicMap with dark/light mode compatible CartoDB tiles
- Add custom text selection background color with primary theme color
- Update all loading states to use proper CSS variables instead of hardcoded colors
- Fix dashboard layout background to use bg-background instead of bg-gray-100
2025-06-28 04:19:39 +02:00

31 lines
756 B
TypeScript

"use client";
import { cn } from "@/lib/utils";
import { motion, MotionProps, useScroll } from "motion/react";
import React from "react";
interface ScrollProgressProps
extends Omit<React.HTMLAttributes<HTMLElement>, keyof MotionProps> {}
export const ScrollProgress = React.forwardRef<
HTMLDivElement,
ScrollProgressProps
>(({ className, ...props }, ref) => {
const { scrollYProgress } = useScroll();
return (
<motion.div
ref={ref}
className={cn(
"fixed inset-x-0 top-0 z-50 h-px origin-left bg-gradient-to-r from-[#A97CF8] via-[#F38CB8] to-[#FDCC92]",
className,
)}
style={{
scaleX: scrollYProgress,
}}
{...props}
/>
);
});
ScrollProgress.displayName = "ScrollProgress";