UNPKG

@commercetools-frontend/application-shell-connectors

Version:
38 lines (37 loc) 1.56 kB
import { type ComponentType, type ReactNode } from 'react'; import type { TImageRegexOptions } from '../../types/generated/settings'; export type TImageRegexContext = { isLoading: boolean; imageRegex?: { small?: Pick<TImageRegexOptions, 'flag' | 'replace' | 'search'> | null; thumb?: Pick<TImageRegexOptions, 'flag' | 'replace' | 'search'> | null; } | null; }; type ProviderProps = { skip?: boolean; children: ReactNode; }; type ConsumerProps = { render: (imageRegex: TImageRegexContext) => ReactNode; children?: never; }; declare const useProjectExtensionImageRegex: () => { isLoading: boolean; imageRegex: { small?: Pick<TImageRegexOptions, "replace" | "search" | "flag"> | null | undefined; thumb?: Pick<TImageRegexOptions, "replace" | "search" | "flag"> | null | undefined; } | null | undefined; }; declare const ProjectExtensionProviderForImageRegex: { (props: ProviderProps): import("@emotion/react/jsx-runtime").JSX.Element; displayName: string; }; declare const GetProjectExtensionImageRegex: { (props: ConsumerProps): import("@emotion/react/jsx-runtime").JSX.Element; displayName: string; }; declare function withProjectExtensionImageRegex<Props extends {}>(propKey?: string): (Component: ComponentType<Props>) => { (props: Props): import("@emotion/react/jsx-runtime").JSX.Element; displayName: string; }; export { GetProjectExtensionImageRegex, ProjectExtensionProviderForImageRegex, withProjectExtensionImageRegex, useProjectExtensionImageRegex, };