@helpwave/hightide
Version:
helpwave's component and theming library
22 lines (19 loc) • 1.02 kB
text/typescript
import * as react_jsx_runtime from 'react/jsx-runtime';
import * as react from 'react';
import { Dispatch, SetStateAction, PropsWithChildren } from 'react';
declare const languages: readonly ["en", "de"];
type Languages = typeof languages[number];
declare const languagesLocalNames: Record<Languages, string>;
declare const DEFAULT_LANGUAGE = "en";
type LanguageContextValue = {
language: Languages;
setLanguage: Dispatch<SetStateAction<Languages>>;
};
declare const LanguageContext: react.Context<LanguageContextValue>;
declare const useLanguage: () => LanguageContextValue;
declare const useLocale: (overWriteLanguage?: Languages) => string;
type ProvideLanguageProps = {
initialLanguage?: Languages;
};
declare const ProvideLanguage: ({ initialLanguage, children }: PropsWithChildren<ProvideLanguageProps>) => react_jsx_runtime.JSX.Element;
export { DEFAULT_LANGUAGE, LanguageContext, type LanguageContextValue, type Languages, ProvideLanguage, languages, languagesLocalNames, useLanguage, useLocale };