UNPKG

@navikt/ds-react

Version:

React components from the Norwegian Labour and Welfare Administration.

50 lines (49 loc) 1.75 kB
import { TFunction } from "../util/i18n/i18n.types"; /** @private */ export declare const getLocaleFromString: (locale?: "nb" | "nn" | "en") => import("date-fns/locale").Locale; /** * @private * Temporary for backwards compatibility with locale prop. Can be removed when locale prop has been removed. */ export declare const getTranslations: (locale: string | undefined) => { chooseDate: string; chooseDates: string; chooseDateRange: string; chooseMonth: string; week: string; weekNumber: string; selectWeekNumber: string; month: string; goToNextMonth: string; goToPreviousMonth: string; year: string; goToNextYear: string; goToPreviousYear: string; openDatePicker: string; openMonthPicker: string; closeDatePicker: string; closeMonthPicker: string; } | undefined; /** * @private * Temporary for backwards compatibility with locale prop. Can be removed when locale prop has been removed. */ export declare const getGlobalTranslations: (locale: string | undefined) => { dateLocale: import("date-fns/locale").Locale; showMore: string; showLess: string; readOnly: string; close: string; error: string; info: string; success: string; warning: string; announcement: string; } | undefined; interface DateTranslationContextProps { translate: TFunction<"DatePicker">; } export declare const DateTranslationContextProvider: import("react").ForwardRefExoticComponent<DateTranslationContextProps & { children: React.ReactNode; } & import("react").RefAttributes<unknown>>, useDateTranslationContext: <S extends boolean = true>(strict?: S) => S extends true ? DateTranslationContextProps : DateTranslationContextProps | undefined; export {};