MCPcopy Index your code
hub / github.com/adobe/react-spectrum / CalendarGridHeader

Function CalendarGridHeader

packages/react-aria-components/src/Calendar.tsx:550–568  ·  view source on GitHub ↗
(
  props: CalendarGridHeaderProps,
  ref: ForwardedRef<HTMLTableSectionElement>
)

Source from the content-addressed store, hash-verified

548}
549
550function 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.

Callers

nothing calls this directly

Calls 3

filterDOMPropsFunction · 0.90
mergePropsFunction · 0.90
childrenFunction · 0.85

Tested by

no test coverage detected