diff --git a/src/widgets/weather/WeatherIcon.tsx b/src/widgets/weather/WeatherIcon.tsx
index c55c8a4c9..f44b20a73 100644
--- a/src/widgets/weather/WeatherIcon.tsx
+++ b/src/widgets/weather/WeatherIcon.tsx
@@ -11,9 +11,11 @@ import {
Icon,
} from '@tabler/icons-react';
import { useTranslation } from 'next-i18next';
+import { useElementSize } from '@mantine/hooks';
interface WeatherIconProps {
code: number;
+ size?: number;
}
/**
@@ -21,16 +23,17 @@ interface WeatherIconProps {
* @param code weather code from api
* @returns weather tile component
*/
-export const WeatherIcon = ({ code }: WeatherIconProps) => {
+export const WeatherIcon = ({ code, size=50 }: WeatherIconProps) => {
const { t } = useTranslation('modules/weather');
-
+ const { width, ref } = useElementSize();
+
const { icon: Icon, name } =
weatherDefinitions.find((wd) => wd.codes.includes(code)) ?? unknownWeather;
return (
-
+
);
diff --git a/src/widgets/weather/WeatherTile.tsx b/src/widgets/weather/WeatherTile.tsx
index 861d3e6a2..4d603903b 100644
--- a/src/widgets/weather/WeatherTile.tsx
+++ b/src/widgets/weather/WeatherTile.tsx
@@ -85,14 +85,14 @@ function WeatherTile({ widget }: WeatherTileProps) {
return (
-
-
-
+
+
+
{getPerferedUnit(
weather.current_weather.temperature,
widget.properties.displayInFahrenheit