chore: add prettier formatting
All checks were successful
CI / Lint, typecheck and build (push) Successful in 9m56s
All checks were successful
CI / Lint, typecheck and build (push) Successful in 9m56s
This commit is contained in:
@@ -2,14 +2,29 @@ import { Cloud, CloudLightning, CloudRain, CloudSun, MoonStar, Snowflake, Thermo
|
||||
import type { WeatherMood } from "@/types/imgw";
|
||||
import type { CurrentWeatherCondition } from "@/types/imgw-current";
|
||||
|
||||
export function WeatherIcon({ mood, condition, className = "" }: { mood: WeatherMood; condition?: CurrentWeatherCondition; className?: string }) {
|
||||
const Icon = condition === "thunderstorm" ? CloudLightning : condition === "rain" ? CloudRain : condition === "snow" ? Snowflake : {
|
||||
warm: ThermometerSun,
|
||||
cloudy: Cloud,
|
||||
wind: Wind,
|
||||
cold: Snowflake,
|
||||
night: MoonStar,
|
||||
mild: CloudSun,
|
||||
}[mood];
|
||||
export function WeatherIcon({
|
||||
mood,
|
||||
condition,
|
||||
className = "",
|
||||
}: {
|
||||
mood: WeatherMood;
|
||||
condition?: CurrentWeatherCondition;
|
||||
className?: string;
|
||||
}) {
|
||||
const Icon =
|
||||
condition === "thunderstorm"
|
||||
? CloudLightning
|
||||
: condition === "rain"
|
||||
? CloudRain
|
||||
: condition === "snow"
|
||||
? Snowflake
|
||||
: {
|
||||
warm: ThermometerSun,
|
||||
cloudy: Cloud,
|
||||
wind: Wind,
|
||||
cold: Snowflake,
|
||||
night: MoonStar,
|
||||
mild: CloudSun,
|
||||
}[mood];
|
||||
return <Icon className={className} strokeWidth={1.35} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user