mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 11:52:09 +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
44 lines
1021 B
TypeScript
44 lines
1021 B
TypeScript
"use client";
|
|
|
|
import React, { memo } from "react";
|
|
|
|
interface AuroraTextProps {
|
|
children: React.ReactNode;
|
|
className?: string;
|
|
colors?: string[];
|
|
speed?: number;
|
|
}
|
|
|
|
export const AuroraText = memo(
|
|
({
|
|
children,
|
|
className = "",
|
|
colors = ["#FF0080", "#7928CA", "#0070F3", "#38bdf8"],
|
|
speed = 1,
|
|
}: AuroraTextProps) => {
|
|
const gradientStyle = {
|
|
backgroundImage: `linear-gradient(135deg, ${colors.join(", ")}, ${
|
|
colors[0]
|
|
})`,
|
|
WebkitBackgroundClip: "text",
|
|
WebkitTextFillColor: "transparent",
|
|
animationDuration: `${10 / speed}s`,
|
|
};
|
|
|
|
return (
|
|
<span className={`relative inline-block ${className}`}>
|
|
<span className="sr-only">{children}</span>
|
|
<span
|
|
className="relative animate-aurora bg-[length:200%_auto] bg-clip-text text-transparent"
|
|
style={gradientStyle}
|
|
aria-hidden="true"
|
|
>
|
|
{children}
|
|
</span>
|
|
</span>
|
|
);
|
|
},
|
|
);
|
|
|
|
AuroraText.displayName = "AuroraText";
|