UNPKG

940 BTypeScriptView Raw
1import React from 'react';
2import hoistStatics from 'hoist-non-react-statics';
3import { useI18n } from './i18n';
4import { useStickyManager } from './sticky-manager';
5import { useAppBridge } from './app-bridge';
6import { useMediaQuery } from './media-query';
7export interface WithAppProviderProps {
8 polaris: {
9 intl: ReturnType<typeof useI18n>;
10 stickyManager: ReturnType<typeof useStickyManager>;
11 appBridge: ReturnType<typeof useAppBridge>;
12 mediaQuery: ReturnType<typeof useMediaQuery>;
13 };
14}
15export declare function withAppProvider<OwnProps>(): <C>(WrappedComponent: (React.ComponentClass<OwnProps & WithAppProviderProps, any> & C) | (React.FunctionComponent<OwnProps & WithAppProviderProps> & C)) => React.FunctionComponent<OwnProps> & hoistStatics.NonReactStatics<(React.ComponentClass<OwnProps & WithAppProviderProps, any> & C) | (React.FunctionComponent<OwnProps & WithAppProviderProps> & C), {}>;