react-chrono
Version:
A Modern Timeline component for React
20 lines (19 loc) • 999 B
TypeScript
import { TextDensity, TimelineMode, TimelineModel, TimelineProps } from '@models/TimelineModel';
import { RefObject } from 'react';
export type TimelineToolbarProps = Pick<TimelineModel, 'activeTimelineItem' | 'slideShowEnabled' | 'slideShowRunning' | 'onRestartSlideshow' | 'onNext' | 'onPrevious' | 'onPaused' | 'onFirst' | 'onLast' | 'items' | 'mode'> & {
id: string;
onActivateTimelineItem: (id: string) => void;
onUpdateTextContentDensity: (value: TextDensity) => void;
onUpdateTimelineMode: (mode: TimelineMode) => void;
toggleDarkMode: () => void;
totalItems: number;
searchQuery: string;
onSearchChange: (query: string) => void;
onClearSearch: () => void;
onNextMatch: () => void;
onPreviousMatch: () => void;
totalMatches: number;
currentMatchIndex: number;
onSearchKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
searchInputRef?: RefObject<HTMLInputElement>;
} & Pick<TimelineProps, 'darkMode' | 'flipLayout'>;