@helpwave/hightide
Version:
helpwave's component and theming library
19 lines (16 loc) • 800 B
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
import * as react from 'react';
import { Dispatch, SetStateAction, PropsWithChildren } from 'react';
import { Language } from './util.js';
type LanguageContextValue = {
language: Language;
setLanguage: Dispatch<SetStateAction<Language>>;
};
declare const LanguageContext: react.Context<LanguageContextValue>;
declare const useLanguage: () => LanguageContextValue;
declare const useLocale: (overWriteLanguage?: Language) => string;
type LanguageProviderProps = {
initialLanguage?: Language;
};
declare const LanguageProvider: ({ initialLanguage, children }: PropsWithChildren<LanguageProviderProps>) => react_jsx_runtime.JSX.Element;
export { LanguageContext, type LanguageContextValue, LanguageProvider, useLanguage, useLocale };