mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2026-01-07 08:12:49 +00:00
27 lines
579 B
JavaScript
27 lines
579 B
JavaScript
import { App, Widget } from '../../imports.js';
|
|
const { Revealer, Box, Window } = Widget;
|
|
|
|
|
|
export default ({
|
|
name,
|
|
child,
|
|
showClassName,
|
|
hideClassName,
|
|
...props
|
|
}) => Window({
|
|
name,
|
|
popup: true,
|
|
visible: false,
|
|
layer: 'overlay',
|
|
...props,
|
|
|
|
child: Box({
|
|
className: `${showClassName} ${hideClassName}`,
|
|
connections: [[App, (self, currentName, visible) => {
|
|
if (currentName === name) {
|
|
self.toggleClassName(hideClassName, !visible);
|
|
}
|
|
}]],
|
|
child: child,
|
|
}),
|
|
}); |