@magicbell/magicbell-react
Version:
React components for building a notification inbox for your app
15 lines • 475 B
JavaScript
;
/* eslint-disable no-restricted-globals */
Object.defineProperty(exports, "__esModule", { value: true });
exports.openWindow = openWindow;
/**
* Open a centered popup window.
*
* @param url Url of the floating window
*/
function openWindow(url) {
const top = (screen.height - 400) / 4;
const left = (screen.width - 600) / 2;
window.open(url, '', `width=600,height=400,scrollbars=no,top=${top},left=${left}`);
}
//# sourceMappingURL=window.js.map