forked from klaviyo/react-frame-component
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
31 lines (24 loc) · 917 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
declare module 'react-frame-component' {
import * as React from 'react';
export interface FrameComponentProps
extends React.IframeHTMLAttributes<HTMLIFrameElement> {
head?: React.ReactNode | undefined;
mountTarget?: string | undefined;
initialContent?: string | undefined;
contentDidMount?: (() => void) | undefined;
contentDidUpdate?: (() => void) | undefined;
children: React.ReactNode;
ref?: React.Ref<HTMLIFrameElement>;
}
export default class FrameComponent extends React.Component<
FrameComponentProps
> {}
export interface FrameContextProps {
document?: HTMLDocument;
window?: Window;
}
export const FrameContext: React.Context<FrameContextProps>;
export const FrameContextProvider: React.Provider<FrameContextProps>;
export const FrameContextConsumer: React.Consumer<FrameContextProps>;
export function useFrame(): FrameContextProps;
}