Files
dotfiles/ags/HyprPanel/modules/menus/calendar/weather/icon/index.ts
T
2024-10-23 21:12:15 +07:00

19 lines
656 B
TypeScript

import { Weather } from 'lib/types/weather';
import { Variable } from 'types/variable';
import { getWeatherStatusTextIcon } from 'globals/weather.js';
import { BoxWidget } from 'lib/types/widget';
export const TodayIcon = (theWeather: Variable<Weather>): BoxWidget => {
return Widget.Box({
vpack: 'center',
hpack: 'start',
class_name: 'calendar-menu-weather today icon container',
child: Widget.Label({
class_name: 'calendar-menu-weather today icon txt-icon',
label: theWeather.bind('value').as((w) => {
return getWeatherStatusTextIcon(w);
}),
}),
});
};