UNPKG

react-day-picker

Version:

Customizable Date Picker for React

28 lines (27 loc) 1.04 kB
import React from "react"; import { UI } from "../UI.js"; import type { ClassNames, CustomComponents } from "../types/index.js"; /** An option to use in the dropdown. Maps to the `<option>` HTML element. */ export type DropdownOption = { /** The value of the option. */ value: number; /** The label of the option. */ label: string; /** * The dropdown option is disabled when it cannot be selected because out of * the calendar range. */ disabled: boolean; }; /** * Render a dropdown component to use in the navigation bar. * * @group Components * @see https://daypicker.dev/guides/custom-components */ export declare function Dropdown(props: { components: Pick<CustomComponents, "Select" | "Option" | "Chevron">; classNames: Pick<ClassNames, UI.DropdownRoot | UI.Dropdown | UI.CaptionLabel | UI.Chevron>; options?: DropdownOption[] | undefined; } & Omit<JSX.IntrinsicElements["select"], "children">): React.JSX.Element; export type DropdownProps = Parameters<typeof Dropdown>[0];