// @flow strict import * as React from 'react'; import type {ColorTypes} from '../../../types/typography'; import {TEXT_COLORS} from '../../../types/typography'; import {classify} from '../../../utils/classify'; import {Card, PADDING_SIZES} from '../../Card'; import {ConditionalWrapper} from '../../ConditionalWrapper'; import type {IconType} from '../../Icon'; import {Icon, ICON_SIZE, ICON_TYPE} from '../../Icon'; import type {Orientation} from '../Timeline'; import {ORIENTATION} from '../Timeline'; import css from '../Timeline.module.css'; type ClassNames = $ReadOnly<{ card?: string, icon?: string, title?: string, wrapper?: string, description?: string, }>; export type TimelineItemProps = { id?: string, title?: React.Node, iconName: string, children: React.Node, iconType?: IconType, iconColor?: ColorTypes, classNames?: ClassNames, description?: React.Node, orientation?: Orientation, parentComponent?: React.Node, enableCardWrapper?: boolean, }; const TimelineItem_ = ( { id, title, iconName, iconType = ICON_TYPE.solid, children, iconColor = TEXT_COLORS.information, classNames, description, orientation = ORIENTATION.left, parentComponent, enableCardWrapper = true, }: TimelineItemProps, ref, ): React.Node => (
{parentComponent}
{title}
{description ? (
{description}
) : null}
( {children} )} > {children}
); export const TimelineItem = (React.forwardRef< TimelineItemProps, HTMLDivElement, >(TimelineItem_): React$AbstractComponent);