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:
@ -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",
|
||||
|
@ -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%',
|
||||
|
Reference in New Issue
Block a user