2023-10-02 12:06:35 -04:00
|
|
|
import { App, Widget } from '../../imports.js';
|
|
|
|
const { Revealer, Box } = Widget;
|
|
|
|
const { openWindow } = App;
|
|
|
|
|
2023-09-21 20:01:14 -04:00
|
|
|
|
2023-09-25 12:30:32 -04:00
|
|
|
export const PopUp = ({name, child, transition = 'slide_down', ...params}) => Box({
|
|
|
|
style: 'min-height:1px; min-width:1px',
|
|
|
|
child: Revealer({
|
|
|
|
...params,
|
|
|
|
transition,
|
|
|
|
transitionDuration: 500,
|
2023-10-02 12:06:35 -04:00
|
|
|
connections: [[App, (revealer, currentName, visible) => {
|
2023-09-25 12:30:32 -04:00
|
|
|
if (currentName === name) {
|
|
|
|
revealer.reveal_child = visible;
|
2023-09-22 01:34:36 -04:00
|
|
|
|
2023-09-25 12:30:32 -04:00
|
|
|
if (visible && name !== 'overview')
|
|
|
|
openWindow('closer');
|
|
|
|
}
|
|
|
|
}]],
|
|
|
|
child: child,
|
|
|
|
}),
|
2023-09-21 20:01:14 -04:00
|
|
|
});
|