( props: CalendarGridHeaderProps, ref: ForwardedRef<HTMLTableSectionElement> )
| 548 | } |
| 549 | |
| 550 | function CalendarGridHeader( |
| 551 | props: CalendarGridHeaderProps, |
| 552 | ref: ForwardedRef<HTMLTableSectionElement> |
| 553 | ) { |
| 554 | let {children, style, className} = props; |
| 555 | let {headerProps, weekDays} = useContext(InternalCalendarGridContext)!; |
| 556 | let DOMProps = filterDOMProps(props, {global: true}); |
| 557 | |
| 558 | return ( |
| 559 | <dom.thead |
| 560 | render={props.render} |
| 561 | {...mergeProps(DOMProps, headerProps)} |
| 562 | ref={ref} |
| 563 | style={style} |
| 564 | className={className ?? 'react-aria-CalendarGridHeader'}> |
| 565 | <tr>{weekDays.map((day, key) => React.cloneElement(children(day), {key}))}</tr> |
| 566 | </dom.thead> |
| 567 | ); |
| 568 | } |
| 569 | |
| 570 | /** |
| 571 | * A calendar grid header displays a row of week day names at the top of a month. |
nothing calls this directly
no test coverage detected