testing frame component

This commit is contained in:
sawka 2024-04-15 22:59:13 -07:00
parent 6319b26924
commit f1a6dfb249
3 changed files with 9 additions and 2 deletions

View File

@ -43,6 +43,7 @@
"papaparse": "^5.4.1",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-frame-component": "^5.2.6",
"react-markdown": "^9.0.0",
"remark": "^15.0.1",
"remark-gfm": "^4.0.0",

View File

@ -9,6 +9,7 @@ import { boundMethod } from "autobind-decorator";
import { JsonLinesDataBuffer } from "../core/ptydata";
import { Markdown } from "@/elements";
import * as ijson from "@/util/ijson";
import Frame from "react-frame-component";
import "./waveapp.less";
@ -67,7 +68,7 @@ class WaveAppHtmlTag extends React.Component<{ node: WaveAppNode }, {}> {
}
}
}
let childrenComps = [];
let childrenComps: (string | JSX.Element)[] = [];
if (children != null) {
for (let idx = 0; idx < children.length; idx++) {
let comp = convertNodeToTag(children[idx], idx);
@ -238,7 +239,7 @@ class WaveAppRenderer extends React.Component<{ model: WaveAppRendererModel }, {
}
return (
<div className="waveapp-renderer" style={styleVal}>
{convertNodeToTag(node)}
<Frame>{convertNodeToTag(node)}</Frame>
</div>
);
}

View File

@ -6901,6 +6901,11 @@ react-error-boundary@^3.1.4:
dependencies:
"@babel/runtime" "^7.12.5"
react-frame-component@^5.2.6:
version "5.2.6"
resolved "https://registry.yarnpkg.com/react-frame-component/-/react-frame-component-5.2.6.tgz#0d9991d251ff1f7177479d8f370deea06b824b79"
integrity sha512-CwkEM5VSt6nFwZ1Op8hi3JB5rPseZlmnp5CGiismVTauE6S4Jsc4TNMlT0O7Cts4WgIC3ZBAQ2p1Mm9XgLbj+w==
react-is@^16.13.1:
version "16.13.1"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"