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

39 lines
1.4 KiB
TypeScript

import { TodayIcon } from './icon/index.js';
import { TodayStats } from './stats/index.js';
import { TodayTemperature } from './temperature/index.js';
import { Hourly } from './hourly/index.js';
import { globalWeatherVar } from 'globals/weather.js';
import { BoxWidget } from 'lib/types/widget.js';
const WeatherWidget = (): BoxWidget => {
return Widget.Box({
class_name: 'calendar-menu-item-container weather',
child: Widget.Box({
class_name: 'weather-container-box',
setup: (self) => {
return (self.child = Widget.Box({
vertical: true,
hexpand: true,
children: [
Widget.Box({
class_name: 'calendar-menu-weather today',
hexpand: true,
children: [
TodayIcon(globalWeatherVar),
TodayTemperature(globalWeatherVar),
TodayStats(globalWeatherVar),
],
}),
Widget.Separator({
class_name: 'menu-separator weather',
}),
Hourly(globalWeatherVar),
],
}));
},
}),
});
};
export { WeatherWidget };