"use client"; import type { ReactNode } from "react"; import { motion, useReducedMotion } from "motion/react"; type SolarFlareProps = { children?: ReactNode; className?: string; /** Colour of the sun and its rays. */ color?: string; /** Outer colour of the sun's glow. */ accent?: string; background?: string; /** Sun width in pixels. */ size?: number; /** 1 is the default pace; 2 is twice as fast. */ speed?: number; }; /* SolarFlare: a sun rising over the top edge, with slow turning rays and a pulsing core. */ export function SolarFlare({ children, className = "", color = "#fbbf24", accent = "#f97316", background = "#0c0705", size = 180, speed = 1, }: SolarFlareProps) { const reduce = useReducedMotion(); const rays = `repeating-conic-gradient(color-mix(in srgb, ${color} 30%, transparent) 0deg 4deg, transparent 4deg 18deg)`; const raysMask = "radial-gradient(circle, black 15%, transparent 65%)"; const core = `radial-gradient(circle, #fff7e0 0%, ${color} 30%, ${accent} 55%, transparent 72%)`; return (
{children}
); }