1 | import React, { CSSProperties } from 'react';
|
2 | import { Context } from '@shopify/app-bridge';
|
3 | import { Application } from '.';
|
4 | export interface FrameProps {
|
5 | app: Application;
|
6 | title: string;
|
7 | url: string;
|
8 | [key: string]: any;
|
9 | style?: CSSProperties;
|
10 | context: Context;
|
11 |
|
12 | onUrlChange?: (iframe: HTMLIFrameElement, newUrl: string) => void;
|
13 |
|
14 | onInit?: (frame: Frame) => void;
|
15 | }
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | export default class Frame extends React.Component<FrameProps, never> {
|
24 | iframe?: HTMLIFrameElement;
|
25 | detach?: Function;
|
26 | src: string;
|
27 | static defaultProps: {
|
28 | context: Context;
|
29 | };
|
30 | constructor(props: FrameProps);
|
31 | componentDidMount(): void;
|
32 | componentWillUnmount(): void;
|
33 | componentDidUpdate(prevProps: FrameProps): void;
|
34 | render(): JSX.Element;
|
35 | }
|