fix(deps): update dependency react-frame-component to v5.2.4 (#253)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel Lautzenheiser <lautzd@gmail.com>
This commit is contained in:
renovate[bot]
2022-12-22 10:45:00 -05:00
committed by GitHub
parent ae04ef9b89
commit f35d7f8777
3 changed files with 8 additions and 8 deletions

View File

@ -123,7 +123,7 @@
"react-dnd": "16.0.1",
"react-dnd-html5-backend": "16.0.1",
"react-dom": "18.2.0",
"react-frame-component": "5.2.3",
"react-frame-component": "5.2.4",
"react-is": "18.2.0",
"react-polyglot": "0.7.2",
"react-redux": "8.0.5",

View File

@ -104,10 +104,10 @@ const CodeBlockElement: FC<PlateRenderElementProps<MdValue, MdCodeBlockElement>>
);
const [height, setHeight] = useState(24);
const iframeRef = useRef<Frame & HTMLIFrameElement>();
const iframeRef = useRef<typeof Frame & HTMLIFrameElement>();
const handleResize = useCallback(
(iframe: MutableRefObject<(Frame & HTMLIFrameElement) | undefined>) => {
(iframe: MutableRefObject<(typeof Frame & HTMLIFrameElement) | undefined>) => {
const height = iframe.current?.contentDocument?.body?.scrollHeight ?? 0;
if (height !== 0) {
setHeight(height);
@ -140,7 +140,7 @@ const CodeBlockElement: FC<PlateRenderElementProps<MdValue, MdCodeBlockElement>>
<Frame
key={`code-frame-${id}`}
id={id}
ref={iframeRef as RefObject<Frame> & RefObject<HTMLIFrameElement>}
ref={iframeRef as RefObject<typeof Frame> & RefObject<HTMLIFrameElement>}
style={{
border: 'none',
width: '100%',