import * as React from 'react'; import classNames from 'classnames'; export interface TimeLineItemProps { prefixCls?: string; className?: string; color?: string; dot?: React.ReactNode; pending?: boolean; style?: React.CSSProperties; } export default class TimelineItem extends React.Component { static defaultProps = { prefixCls: 'ant-timeline', color: 'blue', pending: false, }; render() { const { prefixCls, className, color = '', children, pending, dot, ...restProps } = this.props; const itemClassName = classNames({ [`${prefixCls}-item`]: true, [`${prefixCls}-item-pending`]: pending, }, className); const dotClassName = classNames({ [`${prefixCls}-item-head`]: true, [`${prefixCls}-item-head-custom`]: dot, [`${prefixCls}-item-head-${color}`]: true, }); return (
  • {dot}
    {children}
  • ); } }