EverydayTech Platform - Developer Reference
Complete Source Code Documentation - All Applications
Loading...
Searching...
No Matches
ThemeIndicator.tsx
Go to the documentation of this file.
1"use client";
2
3import { useTheme } from '@/contexts/ThemeContext';
4import { useIcon } from '@/contexts/IconContext';
5import Link from 'next/link';
6
7export default function ThemeIndicator() {
8 const { theme, themeId } = useTheme();
9 const { iconTheme } = useIcon();
10
11 return (
12 <Link
13 href="/pages/settings"
14 className="fixed bottom-4 right-4 z-50 group"
15 title={`Theme: ${theme.name} | Icons: ${iconTheme.name}`}
16 >
17 <div
18 className="p-3 rounded-full shadow-lg transition-all duration-300 group-hover:scale-110 cursor-pointer"
19 style={{
20 background: theme.colors.brand,
21 boxShadow: `0 8px 24px ${theme.colors.brand}40, 0 0 0 0 ${theme.colors.brand}20`,
22 }}
23 >
24 <div className="flex items-center gap-2">
25 <div className="flex gap-1">
26 <div
27 className="w-4 h-4 rounded-full"
28 style={{ background: theme.colors.brand }}
29 />
30 <div
31 className="w-4 h-4 rounded-full"
32 style={{ background: theme.colors.brand2 }}
33 />
34 </div>
35 <span className="text-white font-semibold text-sm hidden group-hover:inline-block transition-all">
36 {theme.name}
37 </span>
38 </div>
39 </div>
40
41 {/* Tooltip */}
42 <div className="absolute bottom-full right-0 mb-2 px-3 py-2 rounded-lg shadow-lg opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap"
43 style={{
44 background: theme.colors.surface,
45 border: `2px solid ${theme.colors.brand}`,
46 color: theme.colors.text,
47 }}
48 >
49 <p className="text-sm font-semibold">🎨 {theme.name}</p>
50 <p className="text-xs mb-1" style={{ color: theme.colors.muted }}>
51 Theme
52 </p>
53 <p className="text-sm font-semibold">🎭 {iconTheme.name}</p>
54 <p className="text-xs" style={{ color: theme.colors.muted }}>
55 Click to change
56 </p>
57 </div>
58 </Link>
59 );
60}