@aimake/nanod
Version:
## 设计模式 NANO DESIGN 是面向于企业级中台化应用的解决方案。服务于 ToB 和 ToE 类型的单页应用,应用于各产品中从而产出了一套设计及前端规范。
27 lines (26 loc) • 759 B
TypeScript
import * as React from 'react';
import * as PropTypes from 'prop-types';
export interface LocaleReceiverProps {
componentName?: string;
defaultLocale?: object | Function;
children: (locale: object, localeCode?: string) => React.ReactElement<any>;
}
interface LocaleInterface {
[key: string]: any;
}
export interface LocaleReceiverContext {
antLocale?: LocaleInterface;
}
export default class LocaleReceiver extends React.Component<LocaleReceiverProps> {
static defaultProps: {
componentName: string;
};
static contextTypes: {
antLocale: PropTypes.Requireable<object>;
};
context: LocaleReceiverContext;
getLocale(): any;
getLocaleCode(): any;
render(): React.ReactElement<any>;
}
export {};