UNPKG

react-image-timeline

Version:

An image-centric timeline component for React.js. View chronological events in a pleasant way.

33 lines (32 loc) 1.21 kB
import React from 'react'; export interface TimelineEventClickHandler { (event: any): void; } export interface TimelineEvent { date: Date; title: string; imageUrl: string; text: string; onClick?: TimelineEventClickHandler | null; buttonText?: string | null; extras?: object | null; } export interface TimelineEventProps { event: TimelineEvent; } export interface TimelineCustomComponents { topLabel?: React.PureComponent<TimelineEventProps> | React.ReactNode | null; bottomLabel?: React.PureComponent<TimelineEventProps> | React.ReactNode | null; header?: React.PureComponent<TimelineEventProps> | React.ReactNode | null; imageBody?: React.PureComponent<TimelineEventProps> | React.ReactNode | null; textBody?: React.PureComponent<TimelineEventProps> | React.ReactNode | null; footer?: React.PureComponent<TimelineEventProps> | React.ReactNode | null; } export interface TimelineProps { customComponents?: TimelineCustomComponents | null; events: Array<TimelineEvent>; reverseOrder?: boolean; denseLayout?: boolean; } declare const Timeline: React.MemoExoticComponent<(props: TimelineProps) => JSX.Element>; export default Timeline;