add format option to weather widgets
This commit is contained in:
parent
83d1ea5ec4
commit
019a70ef24
@ -46,6 +46,7 @@ function Widget({ options }) {
|
|||||||
value: data.current_weather.temperature,
|
value: data.current_weather.temperature,
|
||||||
style: "unit",
|
style: "unit",
|
||||||
unit,
|
unit,
|
||||||
|
...options.format,
|
||||||
})}
|
})}
|
||||||
</PrimaryText>
|
</PrimaryText>
|
||||||
<SecondaryText>{t(`wmo.${data.current_weather.weathercode}-${timeOfDay}`)}</SecondaryText>
|
<SecondaryText>{t(`wmo.${data.current_weather.weathercode}-${timeOfDay}`)}</SecondaryText>
|
||||||
|
|||||||
@ -42,7 +42,7 @@ function Widget({ options }) {
|
|||||||
<Container options={options} additionalClassNames="information-widget-openweathermap">
|
<Container options={options} additionalClassNames="information-widget-openweathermap">
|
||||||
<PrimaryText>
|
<PrimaryText>
|
||||||
{options.label && `${options.label}, `}
|
{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>
|
</PrimaryText>
|
||||||
<SecondaryText>{data.weather[0].description}</SecondaryText>
|
<SecondaryText>{data.weather[0].description}</SecondaryText>
|
||||||
<WidgetIcon icon={mapIcon(condition, timeOfDay)} size="xl" />
|
<WidgetIcon icon={mapIcon(condition, timeOfDay)} size="xl" />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user