1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-14 23:50:06 +00:00

chore: code refactor renamed variables/functions

This commit is contained in:
Saad Jutt
2021-09-08 05:49:24 +05:00
parent cd2b32f2f4
commit 19a57dbf6e
6 changed files with 21 additions and 16 deletions

View File

@@ -1,16 +1,19 @@
import { openLoginPrompt } from '../utils/loginPrompt'
interface windowFeatures {
interface WindowFeatures {
width: number
height: number
}
const defaultWindowFeatures: WindowFeatures = { width: 500, height: 600 }
export async function openWebPage(
url: string,
windowName: string = '',
{ width, height }: windowFeatures,
WindowFeatures: WindowFeatures = defaultWindowFeatures,
onLoggedOut?: () => Promise<Boolean>
): Promise<Window | null> {
const { width, height } = WindowFeatures
const left = screen.width / 2 - width / 2
const top = screen.height / 2 - height / 2