Skip to content

Commit bb8a510

Browse files
Adjust frame height (#525)
Co-authored-by: Eric Lau <[email protected]>
1 parent 949c617 commit bb8a510

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/ui/src/embed.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ const iframes = new WeakMap<MessageEventSource, HTMLIFrameElement>();
1111
let unsupportedVersion: boolean = false;
1212
const unsupportedVersionFrameHeight = 'auto';
1313

14+
const iframeHeightDiff = '206px';
15+
1416
window.addEventListener('message', function (e: MessageEvent<Message>) {
1517
if (e.source) {
1618
if (e.data.kind === 'oz-wizard-unsupported-version') {
@@ -22,7 +24,7 @@ window.addEventListener('message', function (e: MessageEvent<Message>) {
2224
} else if (e.data.kind === 'oz-wizard-resize') {
2325
const iframe = iframes.get(e.source);
2426
if (iframe) {
25-
iframe.style.height = unsupportedVersion ? unsupportedVersionFrameHeight : 'calc(100vh - 100px)';
27+
iframe.style.height = unsupportedVersion ? unsupportedVersionFrameHeight : `calc(100vh - ${iframeHeightDiff})`;
2628
}
2729
}
2830
}
@@ -60,7 +62,7 @@ onDOMContentLoaded(function () {
6062
iframe.style.display = 'block';
6163
iframe.style.border = '0';
6264
iframe.style.width = '100%';
63-
iframe.style.height = 'calc(100vh - 100px)';
65+
iframe.style.height = `calc(100vh - ${iframeHeightDiff} )`;
6466
iframe.allow = 'clipboard-write';
6567

6668
w.appendChild(iframe);

packages/ui/src/standalone.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ body {
131131

132132
/* Wizard */
133133
.wizard-container {
134-
padding: 0 1rem 1.5rem;
134+
padding: 0 1rem 0;
135135
max-width: 100%;
136136
margin: 0 auto 0;
137137
}

0 commit comments

Comments
 (0)