UNPKG

@fesjs/fes-design

Version:
29 lines (28 loc) 1.16 kB
import type { InjectionKey, PropType, Ref } from 'vue'; import type { TypeLanguage } from '../locales'; import type { Theme } from '../_theme/interface'; import type { ExtractPublicPropTypes, GetContainer } from '../_util/interface'; export type TranslatorOptionType = Record<string, string | number>; export type TranslatorType = (path: string, option?: TranslatorOptionType) => string; export interface LocaleContextType { locale: Ref<TypeLanguage>; lang: Ref<string>; t: TranslatorType; } export declare const configProviderProps: { readonly locale: PropType<TypeLanguage>; readonly getContainer: { readonly type: PropType<GetContainer>; readonly default: () => HTMLElement; }; readonly theme: StringConstructor; readonly themeOverrides: PropType<Theme>; }; export type ConfigProviderProps = ExtractPublicPropTypes<typeof configProviderProps>; export interface ConfigProviderContextType { locale?: Ref<TypeLanguage>; getContainer?: Ref<GetContainer>; theme?: Ref<string>; themeOverrides?: Ref<Theme>; } export declare const CONFIG_PROVIDER_INJECTION_KEY: InjectionKey<ConfigProviderContextType>;