import { ReactNode } from "react" // @mui material components import Icon from "@mui/material/Icon" // ThreeD Garden components import MDBox from "~/components/mui/MDBox" import MDTypography from "~/components/mui/MDTypography" // Timeline context import { useTimeline } from "~/components/elements/Timeline/context" // Custom styles for the TimelineItem import timelineItem from "~/components/elements/Timeline/TimelineItem/styles" // Declaring prop types for TimelineItem interface Props { color?: | "primary" | "secondary" | "info" | "success" | "warning" | "error" | "dark" | "light" icon: ReactNode title: string dateTime: string description?: string lastItem?: boolean [key: string]: any } function TimelineItem({ color, icon, title, dateTime, description, lastItem, }: Props): JSX.Element { const isDark = useTimeline() return ( timelineItem(theme, { lastItem, isDark })}> size.sm }}> {icon} {title} {dateTime} {description ? ( {description} ) : null} ) } // Declaring default props for TimelineItem TimelineItem.defaultProps = { color: "info", lastItem: false, description: "", } export default TimelineItem