UNPKG

@vtex/admin-ui

Version:

> VTEX admin component library

31 lines (30 loc) 1.19 kB
import React from 'react'; declare const locales: readonly ["pt-BR", "en-US", "es-AR", "fr-FR", "ja-JP", "ko-KR", "it-IT", "nl-NL", "ro-RO"]; export declare type Locale = typeof locales[number]; declare const englishTranslation: { comboboxLabel: string; placeholder: string; adminPages: string; lastSearches: string; toNavigate: string; toSelect: string; toCancel: string; emptyTitle: string; emptySubtitle: string; }; export declare function useLocale(): { intl: (id: "comboboxLabel" | "placeholder" | "adminPages" | "lastSearches" | "toNavigate" | "toSelect" | "toCancel" | "emptyTitle" | "emptySubtitle") => string; locale: "pt-BR" | "en-US" | "es-AR" | "fr-FR" | "ja-JP" | "ko-KR" | "it-IT" | "nl-NL" | "ro-RO"; }; declare const LocaleProvider: React.Provider<"pt-BR" | "en-US" | "es-AR" | "fr-FR" | "ja-JP" | "ko-KR" | "it-IT" | "nl-NL" | "ro-RO">; export { LocaleProvider }; declare type IntlIds = keyof typeof englishTranslation; interface IntlProps { id: IntlIds; } /** * Typesafe i18n component * @example * <Intl key=“placeholder” > */ export declare function Intl(props: IntlProps): JSX.Element;