@@ -39,11 +39,69 @@ export default function HelloDarkness() {
39
39
aria-label = {
40
40
theme === DARK ? 'Switch to light theme' : 'Switch to dark theme'
41
41
}
42
- className = "bg-transparent border-none cursor-pointer text-[16px] p-0 inline-flex items-center"
42
+ className = "bg-transparent border-none cursor-pointer text-[16px] p-0 inline-flex items-center text-gray-100 hover:text-blue-200 transition-colors duration-200 "
43
43
onClick = { themeSwitcher }
44
44
data-testid = "hello-darkness"
45
45
>
46
- { theme === DARK ? '🌙' : '☀️' }
46
+ { theme === DARK ? (
47
+ < svg
48
+ xmlns = "http://www.w3.org/2000/svg"
49
+ width = "1.2em"
50
+ height = "1.2em"
51
+ preserveAspectRatio = "xMidYMid meet"
52
+ viewBox = "0 0 24 24"
53
+ >
54
+ < path
55
+ d = "M20.742 13.045a8.088 8.088 0 0 1-2.077.271c-2.135 0-4.14-.83-5.646-2.336a8.025 8.025 0 0 1-2.064-7.723A1 1 0 0 0 9.73 2.034a10.014 10.014 0 0 0-4.489 2.582c-3.898 3.898-3.898 10.243 0 14.143a9.937 9.937 0 0 0 7.072 2.93a9.93 9.93 0 0 0 7.07-2.929a10.007 10.007 0 0 0 2.583-4.491a1.001 1.001 0 0 0-1.224-1.224zm-2.772 4.301a7.947 7.947 0 0 1-5.656 2.343a7.953 7.953 0 0 1-5.658-2.344c-3.118-3.119-3.118-8.195 0-11.314a7.923 7.923 0 0 1 2.06-1.483a10.027 10.027 0 0 0 2.89 7.848a9.972 9.972 0 0 0 7.848 2.891a8.036 8.036 0 0 1-1.484 2.059z"
56
+ fill = "currentColor"
57
+ > </ path >
58
+ </ svg >
59
+ ) : (
60
+ < svg
61
+ xmlns = "http://www.w3.org/2000/svg"
62
+ width = "1.2em"
63
+ height = "1.2em"
64
+ preserveAspectRatio = "xMidYMid meet"
65
+ viewBox = "0 0 512 512"
66
+ >
67
+ < path
68
+ d = "M256 387c-8.5 0-15.4 6.9-15.4 15.4v46.2c0 8.5 6.9 15.4 15.4 15.4s15.4-6.9 15.4-15.4v-46.2c0-8.5-6.9-15.4-15.4-15.4z"
69
+ fill = "currentColor"
70
+ > </ path >
71
+ < path
72
+ d = "M256 48c-8.5 0-15.4 6.9-15.4 15.4v46.2c0 8.5 6.9 15.4 15.4 15.4s15.4-6.9 15.4-15.4V63.4c0-8.5-6.9-15.4-15.4-15.4z"
73
+ fill = "currentColor"
74
+ > </ path >
75
+ < path
76
+ d = "M125 256c0-8.5-6.9-15.4-15.4-15.4H63.4c-8.5 0-15.4 6.9-15.4 15.4s6.9 15.4 15.4 15.4h46.2c8.5 0 15.4-6.9 15.4-15.4z"
77
+ fill = "currentColor"
78
+ > </ path >
79
+ < path
80
+ d = "M448.6 240.6h-46.2c-8.5 0-15.4 6.9-15.4 15.4s6.9 15.4 15.4 15.4h46.2c8.5 0 15.4-6.9 15.4-15.4s-6.9-15.4-15.4-15.4z"
81
+ fill = "currentColor"
82
+ > </ path >
83
+ < path
84
+ d = "M152.5 344.1c-4.1 0-8 1.6-10.9 4.5l-32.7 32.7c-2.9 2.9-4.5 6.8-4.5 10.9s1.6 8 4.5 10.9c2.9 2.9 6.8 4.5 10.9 4.5 4.1 0 8-1.6 10.9-4.5l32.7-32.7c6-6 6-15.8 0-21.8-2.9-2.9-6.8-4.5-10.9-4.5z"
85
+ fill = "currentColor"
86
+ > </ path >
87
+ < path
88
+ d = "M359.5 167.9c4.1 0 8-1.6 10.9-4.5l32.7-32.7c2.9-2.9 4.5-6.8 4.5-10.9s-1.6-8-4.5-10.9c-2.9-2.9-6.8-4.5-10.9-4.5-4.1 0-8 1.6-10.9 4.5l-32.7 32.7c-2.9 2.9-4.5 6.8-4.5 10.9s1.6 8 4.5 10.9c2.9 2.9 6.8 4.5 10.9 4.5z"
89
+ fill = "currentColor"
90
+ > </ path >
91
+ < path
92
+ d = "M130.7 108.9c-2.9-2.9-6.8-4.5-10.9-4.5-4.1 0-8 1.6-10.9 4.5-2.9 2.9-4.5 6.8-4.5 10.9 0 4.1 1.6 8 4.5 10.9l32.7 32.7c2.9 2.9 6.8 4.5 10.9 4.5 4.1 0 8-1.6 10.9-4.5 2.9-2.9 4.5-6.8 4.5-10.9s-1.6-8-4.5-10.9l-32.7-32.7z"
93
+ fill = "currentColor"
94
+ > </ path >
95
+ < path
96
+ d = "M370.4 348.6c-2.9-2.9-6.8-4.5-10.9-4.5-4.1 0-8 1.6-10.9 4.5-6 6-6 15.8 0 21.8l32.7 32.7c2.9 2.9 6.8 4.5 10.9 4.5 4.1 0 8-1.6 10.9-4.5 2.9-2.9 4.5-6.8 4.5-10.9s-1.6-8-4.5-10.9l-32.7-32.7z"
97
+ fill = "currentColor"
98
+ > </ path >
99
+ < path
100
+ d = "M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96z"
101
+ fill = "currentColor"
102
+ > </ path >
103
+ </ svg >
104
+ ) }
47
105
</ button >
48
106
) ;
49
107
}
0 commit comments