import React, { CSSProperties } from 'react'; import { Context } from '@shopify/app-bridge'; import { Application } from '.'; export interface FrameProps { app: Application; title: string; url: string; [key: string]: any; style?: CSSProperties; context: Context; /** The handler called when the `url` prop changes*/ onUrlChange?: (iframe: HTMLIFrameElement, newUrl: string) => void; /** The handler called to set a reference to this class*/ onInit?: (frame: Frame) => void; } /** * Renders an iframe and sets up a `MessageTransport` between * the iframe and the parent window * @public * @remarks The iframe is never updated to prevent duplicated browser history entries * When a new url is received the `onUrlChange` is called with the iframe and the new url * */ export default class Frame extends React.Component { iframe?: HTMLIFrameElement; detach?: Function; src: string; static defaultProps: { context: Context; }; constructor(props: FrameProps); componentDidMount(): void; componentWillUnmount(): void; componentDidUpdate(prevProps: FrameProps): void; render(): JSX.Element; }