import Header from '../Header'; import type { Locale } from '../../interface'; import type { GenerateConfig } from '../../generate'; import { useInjectPanel } from '../../PanelContext'; import { formatValue } from '../../utils/dateUtil'; import useMergeProps from '../../hooks/useMergeProps'; export type MonthHeaderProps = { prefixCls: string; viewDate: DateType; locale: Locale; generateConfig: GenerateConfig; onPrevYear: () => void; onNextYear: () => void; onYearClick: () => void; }; function MonthHeader(_props: MonthHeaderProps) { const props = useMergeProps(_props); const { prefixCls, generateConfig, locale, viewDate, onNextYear, onPrevYear, onYearClick } = props; const { hideHeader } = useInjectPanel(); if (hideHeader.value) { return null; } const headerPrefixCls = `${prefixCls}-header`; return (
); } MonthHeader.displayName = 'MonthHeader'; MonthHeader.inheritAttrs = false; export default MonthHeader;