@shopify/app-bridge-host
Version:
App Bridge Host contains components and middleware to be consumed by the app's host, as well as the host itself. The middleware and `Frame` component are responsible for facilitating communication between the client and host, and used to act on actions se
25 lines (24 loc) • 1.05 kB
TypeScript
import React from 'react';
import { FrameProps } from '../Frame';
import type { RouterContext } from '../HostProvider';
import { ComponentProps } from '../types';
import { WithFeature } from '../store/reducers/embeddedApp/navigation';
interface ExtraProps extends Pick<FrameProps, 'onInit'> {
onLocationUpdate?(location: RouterContext['location']): void;
[key: string]: any;
}
type ComposedProps = WithFeature & ExtraProps;
/**
* Renders a Frame component with the Context set to `Main`
* Handles updating the iframe url for all app-related Navigation actions
* @public
* @requires RouterContext
* @requires HostContext
* */
export declare function MainFrame(props: ComposedProps): React.JSX.Element;
/**
* The MainFrame component with the Navigation feature
* @public
* */
declare const _default: import("@shopify/react-compose").ReactComponent<ComponentProps & ExtraProps> & import("@shopify/useful-types").NonReactStatics<import("@shopify/react-compose").ReactComponent<ComposedProps> & typeof MainFrame>;
export default _default;