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:
@@ -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,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user