mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 13:32:08 +01:00
- 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
31 lines
756 B
TypeScript
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";
|