import React, { type JSX } from 'react' import type { TimelineItemProps } from './timelineitem' import { classNames } from '../../utils/classNames' import styles from './timelineitem.module.scss' export type Props = Omit & { TitleTag?: keyof JSX.IntrinsicElements children: React.ReactNode } const TimelineItem = ({ title, TitleTag = 'span', icon, className, children }: Props) => { const classes = classNames([ styles.item, icon && styles['with-icon'], className ]) return (
  • {icon && ( )} {title && ( {title} )} {children}
  • ) } export default TimelineItem