UNPKG

react-calendar-timeline

Version:
26 lines (25 loc) 1.19 kB
import React, { HTMLProps } from 'react'; import { Interval as IntervalType, IntervalRenderer } from '../types/main'; import { Dayjs } from 'dayjs'; import { SelectUnits } from '../utility/calendar'; import { GetIntervalPropsType } from './types'; export interface CustomDateHeaderProps<Data> { headerContext: { intervals: IntervalType[]; unit: SelectUnits; }; getRootProps: (props?: { style?: React.CSSProperties; }) => HTMLProps<HTMLDivElement>; getIntervalProps: GetIntervalPropsType; showPeriod: (start: Dayjs, end: Dayjs) => void; data: { style: React.CSSProperties; intervalRenderer: (props: IntervalRenderer<Data>) => React.ReactNode; className?: string; getLabelFormat: (interval: [Dayjs, Dayjs], unit: string, labelWidth: number) => string; unitProp?: 'primaryHeader'; headerData?: Data; }; } export declare function CustomDateHeader<Data>({ headerContext: { intervals, unit }, getRootProps, getIntervalProps, showPeriod, data: { style, intervalRenderer, className, getLabelFormat, unitProp, headerData }, }: CustomDateHeaderProps<Data>): import("react/jsx-runtime").JSX.Element;