UNPKG

react-day-picker

Version:

Customizable Date Picker for React

16 lines (14 loc) 442 B
import * as defaultLabels from "../labels/index.js"; import type { DayPickerProps, Labels } from "../types/index.js"; /** * Merges custom labels from the props with the default labels. * * @param customLabels The custom labels provided in the DayPicker props. * @returns The merged labels object. */ export function getLabels(customLabels: DayPickerProps["labels"]): Labels { return { ...defaultLabels, ...customLabels }; }