UNPKG

@shopify/app-bridge

Version:

[![Build Status](https://travis-ci.com/Shopify/app-bridge.svg?token=RBRyvqQyN525bnfz7J8p&branch=master)](https://travis-ci.com/Shopify/app-bridge) [![codecov](https://codecov.io/gh/Shopify/app-bridge/branch/master/graph/badge.svg?token=nZ21m39Dr6)](https:

20 lines (19 loc) 780 B
/// <reference types="react" /> import React from 'react'; import { ApiClientConfig, Application, Middleware } from './'; export declare type ReactComponent<P> = React.StatelessComponent<P> | React.ComponentClass<P>; export interface Context { appBridgeMiddleware: Middleware; } export interface DispatchToProps { (app: Application): any; } export interface WithAppProps<Store> { app: Application; store: Store; } export interface RequiredProps { config: ApiClientConfig; } export declare type StoreToProps<Store> = (obj: any) => Store; export declare function withApp<Store>(storeToProps?: StoreToProps<Store>, dispatchToProps?: DispatchToProps): <OwnProps>(WrappedComponent: ReactComponent<OwnProps>) => React.ComponentClass<OwnProps & WithAppProps<Store>>;