import { className } from 'lib/css' import { FC } from 'preact/compat' import Icon from 'ui/components/layout/icon' type EventDividerProps = { className?: string graphicSrc?: string | null graphicType?: 'icon' | 'avatar' iconName?: string iconSize?: '8' | '16' | '32' iconClassName?: string dividerType: string title?: string description?: string } const EventDivider: FC = ({ children, className: providedClassName, graphicSrc, graphicType = 'icon', iconName, iconSize, iconClassName, dividerType, title, description, }) => { const hasGraphic = Boolean(iconName || graphicSrc) return (
{hasGraphic && ( {iconName ? ( ) : ( )} )}
{title ? (

) : null} {description ? (

) : null} {children}

) } export default EventDivider