2024-01-30 11:29:07 -05:00
|
|
|
const { Box, Revealer } = Widget;
|
2023-12-28 00:19:57 -05:00
|
|
|
|
2024-01-13 23:38:31 -05:00
|
|
|
import Separator from '../../misc/separator.ts';
|
|
|
|
import CursorBox from '../../misc/cursorbox.ts';
|
2023-12-28 00:19:57 -05:00
|
|
|
|
|
|
|
|
|
|
|
export default ({
|
|
|
|
class_name,
|
|
|
|
icon,
|
|
|
|
label,
|
|
|
|
spacing = 5,
|
|
|
|
}) => {
|
|
|
|
const hoverRevLabel = Revealer({
|
|
|
|
transition: 'slide_right',
|
|
|
|
|
|
|
|
child: Box({
|
|
|
|
|
|
|
|
children: [
|
|
|
|
Separator(spacing),
|
|
|
|
|
|
|
|
label,
|
|
|
|
],
|
|
|
|
}),
|
|
|
|
});
|
|
|
|
|
|
|
|
const widget = CursorBox({
|
|
|
|
on_hover: () => {
|
|
|
|
hoverRevLabel.reveal_child = true;
|
|
|
|
},
|
|
|
|
|
|
|
|
child: Box({
|
|
|
|
class_name,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
icon,
|
|
|
|
hoverRevLabel,
|
|
|
|
],
|
|
|
|
}),
|
|
|
|
});
|
|
|
|
|
|
|
|
return widget;
|
|
|
|
};
|