UNPKG

764 BTypeScriptView Raw
1import * as React from 'react';
2import * as PropTypes from 'prop-types';
3export interface LocaleReceiverProps {
4 componentName?: string;
5 defaultLocale?: object | Function;
6 children: (locale: object, localeCode?: string, fullLocale?: object) => React.ReactNode;
7}
8interface LocaleInterface {
9 [key: string]: any;
10}
11export interface LocaleReceiverContext {
12 antLocale?: LocaleInterface;
13}
14export default class LocaleReceiver extends React.Component<LocaleReceiverProps> {
15 static defaultProps: {
16 componentName: string;
17 };
18 static contextTypes: {
19 antLocale: PropTypes.Requireable<object>;
20 };
21 context: LocaleReceiverContext;
22 getLocale(): any;
23 getLocaleCode(): any;
24 render(): React.ReactNode;
25}
26export {};