zent
Version:
一套前端设计语言和基于React的实现
14 lines (13 loc) • 602 B
TypeScript
import { Component, ReactNode } from 'react';
import I18nContext from './I18nContext';
import { I18nComponentName, I18nLocaleDataType } from './locale';
export interface II18nReceiverProps<T extends I18nComponentName> {
componentName: T;
children(i18n: I18nLocaleDataType<T>): ReactNode;
}
export default class I18nReceiver<T extends I18nComponentName> extends Component<II18nReceiverProps<T>> {
static contextType: import("react").Context<import("./locale").ILocaleData>;
context: React.ContextType<typeof I18nContext>;
receive(): I18nLocaleDataType<T>;
render(): ReactNode;
}