local-weather/app/weatherIcons.ts
ChrQR dc6882cf71
All checks were successful
Docker Build & Publish / Build Docker (push) Successful in 1m4s
moved weathericon logic out of components as it
was needed in multiple places.
2024-05-17 22:55:48 +02:00

44 lines
2.1 KiB
TypeScript

import cloudAndLightening from "../public/cloud-and-lightening.svg";
import cloudAndMoon from "../public/cloud-and-moon.svg";
import cloudAndRain from "../public/cloud-and-rain.svg";
import cloudAndSnow from "../public/cloud-and-snow.svg";
import cloudAndWind from "../public/cloud-and-wind.svg";
import cloudSnowRain from "../public/cloud-snow-rain.svg";
import cloudAndSun from "../public/cloud-and-sun.svg";
import cloudWindRain from "../public/cloud-wind-rain.svg";
import cloud from "../public/cloud.svg";
import moon from "../public/moon.svg";
import sun from "../public/sun.svg";
import { WeatherIconType } from "@/types/types";
export const weatherIcons: WeatherIconType[] = [
{ code: 0, url: sun }, // clear sky
{ code: 1, url: cloudAndSun }, // clear mainly
{ code: 2, url: cloud }, // partly cloudy
{ code: 3, url: cloud }, // overcast
{ code: 45, url: cloud }, // fog
{ code: 48, url: cloud }, // fog rime
{ code: 51, url: cloudAndRain }, // drizzle light
{ code: 53, url: cloudAndRain }, // drizzle moderate
{ code: 55, url: cloudAndRain }, // drizzle dense
{ code: 56, url: cloudSnowRain }, // drizzle light freezing
{ code: 57, url: cloudSnowRain }, // drizzle dense freezing
{ code: 61, url: cloudAndRain }, // rain slight
{ code: 63, url: cloudAndRain }, // rain moderate
{ code: 65, url: cloudAndRain }, // rain heavy
{ code: 66, url: cloudWindRain }, // rain light freezing
{ code: 67, url: cloudWindRain }, // rain dense freezing
{ code: 71, url: cloudAndSnow }, // snow slight
{ code: 73, url: cloudAndSnow }, // snow moderate
{ code: 75, url: cloudAndSnow }, // snow heavy
{ code: 77, url: cloudAndSnow }, // snow grains
{ code: 80, url: cloudAndRain }, // rain showers slight
{ code: 81, url: cloudAndRain }, // rain showers moderate
{ code: 82, url: cloudAndRain }, // rain showers violent
{ code: 85, url: cloudAndSnow }, // snow showers slight
{ code: 86, url: cloudAndSnow }, // snow showers heavy
{ code: 95, url: cloudAndLightening }, // thunderstorm
{ code: 96, url: cloudAndLightening }, // thunderstorm hail slight
{ code: 99, url: cloudAndLightening }, // thunderstorm hail heavy
];