react-intlayer
Version:
Easily internationalize i18n your React applications with type-safe multilingual content management.
34 lines (33 loc) • 1.16 kB
TypeScript
import * as react0 from "react";
import { FC, PropsWithChildren } from "react";
import { LocalesValues } from "@intlayer/types";
//#region src/client/IntlayerProvider.d.ts
type IntlayerValue = {
locale: LocalesValues;
setLocale: (newLocale: LocalesValues) => void;
disableEditor?: boolean;
isCookieEnabled?: boolean;
};
/**
* Context that store the current locale on the client side
*/
declare const IntlayerClientContext: react0.Context<IntlayerValue>;
/**
* Hook that provides the current locale
*/
declare const useIntlayerContext: () => IntlayerValue;
type IntlayerProviderProps = PropsWithChildren<{
locale?: LocalesValues;
defaultLocale?: LocalesValues;
setLocale?: (locale: LocalesValues) => void;
disableEditor?: boolean;
isCookieEnabled?: boolean;
}>;
/**
* Provider that store the current locale on the client side
*/
declare const IntlayerProviderContent: FC<IntlayerProviderProps>;
declare const IntlayerProvider: FC<IntlayerProviderProps>;
//#endregion
export { IntlayerClientContext, IntlayerProvider, IntlayerProviderContent, IntlayerProviderProps, useIntlayerContext };
//# sourceMappingURL=IntlayerProvider.d.ts.map