Files
custum-hyprpanel/modules/menus/notifications/controls/index.ts
Jas Singh b200b6fadb Fix NerdFont icon alignments. (#143)
* WIP

* Fix nerdfont icon alignments

* Ship needed fonts

* Remove italicised fonts

* Update readme and separate OSD settings into their own category.

* Dashboard styling updates

---------

Co-authored-by: matavach <erik@matijevich.org>
2024-08-18 00:32:22 -07:00

58 lines
2.1 KiB
TypeScript

const Controls = (notifs) => {
return Widget.Box({
class_name: "notification-menu-controls",
expand: false,
vertical: false,
children: [
Widget.Box({
class_name: "menu-label-container notifications",
hpack: "start",
vpack: "center",
expand: true,
children: [
Widget.Label({
class_name: "menu-label notifications",
label: "Notifications",
}),
],
}),
Widget.Box({
hpack: "end",
vpack: "center",
expand: false,
children: [
Widget.Switch({
class_name: "menu-switch notifications",
vpack: "center",
active: notifs.bind("dnd").as((dnd: boolean) => !dnd),
on_activate: ({ active }) => {
notifs.dnd = !active;
},
}),
Widget.Box({
children: [
Widget.Separator({
hpack: "center",
vexpand: true,
vertical: true,
class_name: "menu-separator notification-controls",
}),
Widget.Button({
class_name: "clear-notifications-button",
tooltip_text: "Clear Notifications",
on_primary_click: () => notifs.clear(),
child: Widget.Label({
class_name: "clear-notifications-label txt-icon",
label: "",
}),
}),
],
}),
],
}),
],
});
};
export { Controls };