Skip to content

Commit 7a6cc5a

Browse files
explicit w/h for iframe el
1 parent c5e0633 commit 7a6cc5a

File tree

2 files changed

+13
-11
lines changed
  • packages
    • builder-web-core/widgets-native/html-iframe
    • designto-web/tokens-to-web-widget

2 files changed

+13
-11
lines changed

packages/builder-web-core/widgets-native/html-iframe/index.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { ElementCssStyleData } from "@coli.codes/css";
2-
import type { Color, DimensionLength, IWHStyleWidget } from "@reflect-ui/core";
2+
import type { DimensionLength, IWHStyleWidget } from "@reflect-ui/core";
33
import { WidgetKey } from "../../widget-key";
44
import type { StylableJSXElementConfig } from "../../widget-core";
55
import { Container } from "../container";
@@ -38,8 +38,8 @@ export interface IIframeProps {
3838

3939
readonly src?: string;
4040
readonly srcdoc?: string;
41-
readonly fwidth: DimensionLength;
42-
readonly fheight: DimensionLength;
41+
readonly fwidth?: DimensionLength;
42+
readonly fheight?: DimensionLength;
4343

4444
readonly allow?: string;
4545
readonly loading?: "eager" | "lazy";
@@ -54,8 +54,8 @@ export class HtmlIframe extends Container implements IIframeProps {
5454

5555
readonly src?: string;
5656
readonly srcdoc?: string;
57-
readonly fwidth: DimensionLength;
58-
readonly fheight: DimensionLength;
57+
readonly fwidth?: DimensionLength;
58+
readonly fheight?: DimensionLength;
5959

6060
readonly allow?: string;
6161
readonly loading?: "eager" | "lazy";
@@ -69,8 +69,8 @@ export class HtmlIframe extends Container implements IIframeProps {
6969
title,
7070
src,
7171
srcdoc,
72-
fwidth: width,
73-
fheight: height,
72+
fwidth,
73+
fheight,
7474
allow,
7575
loading,
7676
name,
@@ -84,8 +84,8 @@ export class HtmlIframe extends Container implements IIframeProps {
8484
this.title = title;
8585
this.src = src;
8686
this.srcdoc = srcdoc;
87-
this.fwidth = width;
88-
this.fheight = height;
87+
this.fwidth = fwidth;
88+
this.fheight = fheight;
8989
this.allow = allow;
9090
this.loading = loading;
9191
this.name = name;

packages/designto-web/tokens-to-web-widget/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ function compose<T extends JsxWidget>(
229229
widget instanceof special.XFigmaEmbedView ||
230230
widget instanceof special.XGoogleMapsView ||
231231
widget instanceof special.XOSMView ||
232-
widget instanceof special.XYoutubeView
232+
widget instanceof special.XYoutubeView ||
233+
widget instanceof special.XCameraDisplayView
233234
) {
234235
// xtended views
235236
thisWebWidget = compose_xtended_views(_key, widget);
@@ -273,7 +274,8 @@ function compose<T extends JsxWidget>(
273274
widget.child instanceof special.XFigmaEmbedView ||
274275
widget.child instanceof special.XGoogleMapsView ||
275276
widget.child instanceof special.XOSMView ||
276-
widget.child instanceof special.XYoutubeView
277+
widget.child instanceof special.XYoutubeView ||
278+
widget.child instanceof special.XCameraDisplayView
277279
) {
278280
// xtended views
279281
thisWebWidget = compose_xtended_views(_key, widget.child, widget);

0 commit comments

Comments
 (0)