Implemented the ability to change workspaces by scrolling or clicking on the workspace module. (#12)

* Updated README to add instructions on Notifications.

* Resolves #8 - Implemented scrolling and clicking to change workspaces.

* Remove the hover effect on workspaces as its no longer applicable.
This commit is contained in:
Jas Singh
2024-07-27 20:07:00 -07:00
committed by GitHub
parent 1ad30f4ffe
commit bb6597fe01
8 changed files with 176 additions and 75 deletions

View File

@@ -1,15 +1,27 @@
export const BarItemBox = (child) => {
const computeVisible = () => {
if (Object.hasOwnProperty.call(child, "isVis")) {
return child.isVis.bind("value");
}
return child.isVisible;
};
const computeVisible = () => {
if (Object.hasOwnProperty.call(child, "isVis")) {
return child.isVis.bind("value");
}
return child.isVisible;
};
return Widget.Button({
class_name: `bar_item_box_visible ${Object.hasOwnProperty.call(child, "boxClass") ? child.boxClass : ""}`,
child: child.component,
visible: computeVisible(),
...child.props,
});
if (Object.hasOwnProperty.call(child, "useBox") && child.useBox === true) {
return Widget.Box({
class_name: `bar_item_box_visible ${Object.hasOwnProperty.call(child, "boxClass") ? child.boxClass : ""}`,
child: Widget.EventBox({
class_name: `bar-event-box`,
child: child.component,
...child.props,
}),
visible: computeVisible(),
});
}
return Widget.Button({
class_name: `bar_item_box_visible ${Object.hasOwnProperty.call(child, "boxClass") ? child.boxClass : ""}`,
child: child.component,
visible: computeVisible(),
...child.props,
});
};