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;