react-intl
Version:
Internationalize React apps. This library provides React components and an API to format dates, numbers, and strings, including pluralization and handling translations.
29 lines (28 loc) • 2.37 kB
TypeScript
export * from './types';
export { default as defineMessages } from './define-messages';
export { default as injectIntl, Provider as RawIntlProvider, Context as IntlContext, WithIntlProps, WrappedComponentProps, } from './components/injectIntl';
export { default as useIntl } from './components/useIntl';
export { default as IntlProvider, createIntl } from './components/provider';
export declare const FormattedDate: import("react").FunctionComponent<Intl.DateTimeFormatOptions & import("./types").CustomFormatConfig & {
value: string | number | Date | undefined;
}>;
export declare const FormattedTime: import("react").FunctionComponent<Intl.DateTimeFormatOptions & import("./types").CustomFormatConfig & {
value: string | number | Date | undefined;
}>;
export declare const FormattedNumber: import("react").FunctionComponent<import("@formatjs/intl-unified-numberformat").UnifiedNumberFormatOptions & import("./types").CustomFormatConfig & {
value: number;
}>;
export declare const FormattedDateParts: import("react").FunctionComponent<Intl.DateTimeFormatOptions & import("./types").CustomFormatConfig & {
value: string | number | Date | undefined;
children(val: Intl.DateTimeFormatPart[]): import("react").ReactElement<any, string | ((props: any) => import("react").ReactElement<any, string | any | (new (props: any) => import("react").Component<any, any, any>)> | null) | (new (props: any) => import("react").Component<any, any, any>)> | null;
}>;
export declare const FormattedTimeParts: import("react").FunctionComponent<Intl.DateTimeFormatOptions & import("./types").CustomFormatConfig & {
value: string | number | Date | undefined;
children(val: Intl.DateTimeFormatPart[]): import("react").ReactElement<any, string | ((props: any) => import("react").ReactElement<any, string | any | (new (props: any) => import("react").Component<any, any, any>)> | null) | (new (props: any) => import("react").Component<any, any, any>)> | null;
}>;
export { FormattedNumberParts } from './components/createFormattedComponent';
export { default as FormattedRelativeTime } from './components/relative';
export { default as FormattedPlural } from './components/plural';
export { default as FormattedMessage } from './components/message';
export { default as FormattedHTMLMessage } from './components/html-message';
export { createIntlCache } from './utils';