1 | import React from "react";
|
2 |
|
3 | import type { CalendarMonth } from "../classes/index.js";
|
4 |
|
5 | /**
|
6 | * Render the caption of a month in the calendar.
|
7 | *
|
8 | * @group Components
|
9 | * @see https://daypicker.dev/guides/custom-components
|
10 | */
|
11 | export function MonthCaption(
|
12 | props: {
|
13 | /** The month where the grid is displayed. */
|
14 | calendarMonth: CalendarMonth;
|
15 | /** The index where this month is displayed. */
|
16 | displayIndex: number;
|
17 | } & JSX.IntrinsicElements["div"]
|
18 | ) {
|
19 | const { calendarMonth, displayIndex, ...divProps } = props;
|
20 | return <div {...divProps} />;
|
21 | }
|
22 |
|
23 | export type MonthCaptionProps = Parameters<typeof MonthCaption>[0];
|