@ -31,6 +31,9 @@ export { Carousel };
import Cascader from './cascader';
export { Cascader };
import LocaleProvider from './locale-provider';
export { LocaleProvider };
import Popconfirm from './popconfirm';
export { Popconfirm };
@ -1,7 +1,21 @@
import * as React from 'react';
import { changeConfirmLocale } from '../modal/locale';
export default class LocaleProvider extends React.Component {
export interface LocaleProviderProps {
locale: {
Pagination?: Object,
DatePicker?: Object,
TimePicker?: Object,
Calendar?: Object,
Table?: Object,
Modal?: Object,
Popconfirm?: Object,
Transfer?: Object,
Select?: Object,
};
}
export default class LocaleProvider extends React.Component<LocaleProviderProps, any> {
static propTypes = {
locale: React.PropTypes.object,
@ -8,7 +8,7 @@ const defaultLocale = {
let runtimeLocale = assign({}, defaultLocale);
export function changeConfirmLocale(newLocale) {
export function changeConfirmLocale(newLocale?: Object) {
if (newLocale) {
runtimeLocale = assign({}, runtimeLocale, newLocale);
} else {