Skip to content

Commit fa1d8d2

Browse files
committed
style(weather): update current weather box styles for improved readability and aesthetics
1 parent 810dde8 commit fa1d8d2

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

src/layouts/weather/components/current-box.component.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ interface CurrentWeatherBoxProps {
77
}
88
export function CurrentWeatherBox({ weather }: CurrentWeatherBoxProps) {
99
return (
10-
<div className="h-full col-span-2 p-5 shadow-lg bg-gradient-to-br from-neutral-800 to-neutral-900 rounded-xl">
10+
<div className="h-full col-span-2 p-5 shadow-lg bg-gradient-to-br from-white to-gray-50 dark:from-neutral-800 dark:to-neutral-900 rounded-xl">
1111
<div className="flex items-start justify-between gap-4">
1212
<div className="relative group">
1313
<motion.img
@@ -22,32 +22,35 @@ export function CurrentWeatherBox({ weather }: CurrentWeatherBoxProps) {
2222
</div>
2323

2424
<div className="flex-1 text-right">
25-
<span className="text-4xl font-bold text-white">
25+
<span className="text-4xl font-bold text-gray-800 dark:text-white">
2626
{Math.round(weather.temperature.temp)}°C
2727
</span>
2828

29-
<p className="mt-1 text-sm text-gray-300">
29+
<p className="mt-1 text-sm text-gray-600 dark:text-gray-300">
3030
{weather.description.emoji} {weather.description.text}
3131
</p>
3232

3333
<div className="flex items-center justify-end gap-3 mt-2">
34-
<div className="px-2 py-1 text-sm text-blue-300 rounded-lg bg-blue-500/20">
34+
<div className="px-2 py-1 text-sm text-blue-600 bg-blue-100 rounded-lg dark:text-blue-300 dark:bg-blue-500/20">
3535
🌡️ {weather.temperature.humidity}%
3636
</div>
37-
<div className="px-2 py-1 text-sm text-green-300 rounded-lg bg-green-500/20">
37+
<div className="px-2 py-1 text-sm text-green-600 bg-green-100 rounded-lg dark:text-green-300 dark:bg-green-500/20">
3838
🍃 {weather.temperature.wind_speed} m/s
3939
</div>
4040
</div>
4141
</div>
4242
</div>
4343

44-
<div className="relative p-3 mt-4 rounded-lg bg-neutral-800/50">
44+
<div className="relative p-3 mt-4 rounded-lg bg-gray-100/80 dark:bg-neutral-800/50">
4545
{weather.ai?.description && (
4646
<div className="absolute -translate-y-1/2 left-3 top-1/2">
47-
<BsRobot size={20} className="text-purple-400" />
47+
<BsRobot size={20} className="text-purple-600 dark:text-purple-400" />
4848
</div>
4949
)}
50-
<p className="pl-8 pr-2 text-sm leading-relaxed text-gray-300" dir="rtl">
50+
<p
51+
className="pl-8 pr-2 text-sm leading-relaxed text-gray-700 dark:text-gray-300"
52+
dir="rtl"
53+
>
5154
{weather.ai?.description || weather.temperature.temp_description}
5255
</p>
5356
</div>

0 commit comments

Comments
 (0)