forked from Shinonome/dots-hyprland
sidebar: make modules more accessible
This commit is contained in:
@@ -10,28 +10,30 @@ export default ({
|
|||||||
revealChild = true,
|
revealChild = true,
|
||||||
}) => {
|
}) => {
|
||||||
const headerButtonIcon = MaterialIcon(revealChild ? 'expand_less' : 'expand_more', 'norm');
|
const headerButtonIcon = MaterialIcon(revealChild ? 'expand_less' : 'expand_more', 'norm');
|
||||||
const header = Box({
|
const header = Button({
|
||||||
className: 'txt spacing-h-10',
|
onClicked: () => {
|
||||||
children: [
|
content.revealChild = !content.revealChild;
|
||||||
icon,
|
headerButtonIcon.label = content.revealChild ? 'expand_less' : 'expand_more';
|
||||||
Label({
|
},
|
||||||
className: 'txt-norm',
|
setup: setupCursorHover,
|
||||||
label: `${name}`,
|
child: Box({
|
||||||
}),
|
className: 'txt spacing-h-10',
|
||||||
Box({
|
children: [
|
||||||
hexpand: true,
|
icon,
|
||||||
}),
|
Label({
|
||||||
Button({
|
className: 'txt-norm',
|
||||||
className: 'sidebar-module-btn-arrow',
|
label: `${name}`,
|
||||||
child: headerButtonIcon,
|
}),
|
||||||
onClicked: () => {
|
Box({
|
||||||
console.log('clicked');
|
hexpand: true,
|
||||||
content.revealChild = !content.revealChild;
|
}),
|
||||||
headerButtonIcon.label = content.revealChild ? 'expand_less' : 'expand_more';
|
Box({
|
||||||
},
|
className: 'sidebar-module-btn-arrow',
|
||||||
setup: setupCursorHover,
|
homogeneous: true,
|
||||||
})
|
children: [headerButtonIcon],
|
||||||
]
|
})
|
||||||
|
]
|
||||||
|
})
|
||||||
});
|
});
|
||||||
const content = Revealer({
|
const content = Revealer({
|
||||||
revealChild: revealChild,
|
revealChild: revealChild,
|
||||||
|
|||||||
Reference in New Issue
Block a user