From e4cd1ca7970914048d2f7337cc586cf0b267fed9 Mon Sep 17 00:00:00 2001 From: Georges Haidar Date: Mon, 19 Dec 2022 13:34:22 +1100 Subject: [PATCH] fix: change default export away from React.Component (#227) --- index.d.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/index.d.ts b/index.d.ts index b0e4a11..a4a369c 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2,19 +2,18 @@ declare module 'react-frame-component' { import * as React from 'react'; export interface FrameComponentProps - extends React.IframeHTMLAttributes { + extends React.IframeHTMLAttributes, + React.RefAttributes { head?: React.ReactNode | undefined; mountTarget?: string | undefined; initialContent?: string | undefined; contentDidMount?: (() => void) | undefined; contentDidUpdate?: (() => void) | undefined; children: React.ReactNode; - ref?: React.Ref; } - export default class FrameComponent extends React.Component< - FrameComponentProps - > {} + const FrameComponent: React.ForwardRefExoticComponent; + export default FrameComponent; export interface FrameContextProps { document?: HTMLDocument;