UNPKG

@douyinfe/semi-ui

Version:

A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.

22 lines (21 loc) 803 B
import React, { Component } from 'react'; import { Locale as dateFns } from 'date-fns'; import PropTypes from 'prop-types'; import { Locale } from './interface'; type ChildrenRender<T> = (componentLocal: T, localeCode: string, dateFnsLocale: dateFns, currency: string) => React.ReactNode; export interface LocaleConsumerProps<T> { componentName: string; children?: ChildrenRender<T>; } export default class LocaleConsumer<T> extends Component<LocaleConsumerProps<T>> { static propTypes: { componentName: PropTypes.Validator<string>; children: PropTypes.Requireable<any>; }; static defaultProps: { componentName: string; }; renderChildren(localeData: Locale, children: ChildrenRender<T>): React.ReactNode; render(): React.JSX.Element; } export {};