bc518174
王天杨
提交两个项目文件
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import { useDayPicker } from 'contexts/DayPicker';
import { ActiveModifiers } from 'types/Modifiers';
/** Represent the props for the {@link DayContent} component. */
export interface DayContentProps {
/** The date representing the day. */
date: Date;
/** The month where the day is displayed. */
displayMonth: Date;
/** The active modifiers for the given date. */
activeModifiers: ActiveModifiers;
}
/** Render the content of the day cell. */
export function DayContent(props: DayContentProps): JSX.Element {
const {
locale,
formatters: { formatDay }
} = useDayPicker();
return <>{formatDay(props.date, { locale })}</>;
}
|