Skip to content

Commit

Permalink
Set an initial popup height (#47)
Browse files Browse the repository at this point in the history
* Set initial height on iframe to match skeleton

To reduce the changes of seeing a scrollbar on first load

* Bump version
  • Loading branch information
hwhmeikle committed Nov 30, 2023
1 parent 135bd78 commit 0755f81
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@authsignal/browser",
"version": "0.3.3",
"version": "0.3.4",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
Expand Down
3 changes: 3 additions & 0 deletions src/handlers/popup-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const IFRAME_ID = "__authsignal-popup-iframe";

const DEFAULT_WIDTH = "385px";

const INITIAL_HEIGHT = "384px";

type PopupShowInput = {
url: string;
};
Expand Down Expand Up @@ -97,6 +99,7 @@ export class PopupHandler {
min-width: 100%;
border-radius: inherit;
max-height: 95vh;
height: ${INITIAL_HEIGHT};
}
`;

Expand Down

0 comments on commit 0755f81

Please sign in to comment.