UNPKG

@commercetools-frontend/application-shell-connectors

Version:
20 lines (19 loc) 1.01 kB
import { type ReactNode } from 'react'; import type { CustomViewData } from '@commercetools-frontend/constants'; import { type TApplicationContext } from "../application-context/index.js"; export type TCustomViewContext = { hostUrl: string; customViewConfig: CustomViewData; }; export type TMergedContext = TApplicationContext<{}> & TCustomViewContext; export type TCustomViewContextProviderProps = { hostUrl: string; customViewConfig: CustomViewData; children: ReactNode; }; declare const Context: import("react").Context<{}>; declare const CustomViewContextProvider: (props: TCustomViewContextProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element; declare function useCustomViewContextHook(): TMergedContext; declare function useCustomViewContextHook<SelectedContext>(selector: (context: TMergedContext) => SelectedContext): SelectedContext; declare const useCustomViewContext: typeof useCustomViewContextHook; export { Context, CustomViewContextProvider, useCustomViewContext };