Enhancement: Add formatting options to weather widgets (#3093)

This commit is contained in:
Ben Phelps 2024-03-10 08:52:57 +02:00 committed by GitHub
parent 83d1ea5ec4
commit b5258c5200
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 9 additions and 1 deletions

View file

@ -42,7 +42,7 @@ function Widget({ options }) {
<Container options={options} additionalClassNames="information-widget-openweathermap">
<PrimaryText>
{options.label && `${options.label}, `}
{t("common.number", { value: data.main.temp, style: "unit", unit })}
{t("common.number", { value: data.main.temp, style: "unit", unit, ...options.format })}
</PrimaryText>
<SecondaryText>{data.weather[0].description}</SecondaryText>
<WidgetIcon icon={mapIcon(condition, timeOfDay)} size="xl" />