diff --git a/src/app/components/message/Time.tsx b/src/app/components/message/Time.tsx index 702e682d..bc5e487a 100644 --- a/src/app/components/message/Time.tsx +++ b/src/app/components/message/Time.tsx @@ -9,6 +9,7 @@ export type TimeProps = { ts: number; hour24Clock: boolean; dateFormatString: string; + inheritPriority?: boolean; }; /** @@ -24,7 +25,7 @@ export type TimeProps = { * @returns {React.ReactElement} A element with the formatted date/time. */ export const Time = as<'span', TimeProps & ComponentProps>( - ({ compact, hour24Clock, dateFormatString, ts, className, ...props }, ref) => { + ({ compact, hour24Clock, dateFormatString, ts, inheritPriority, className, ...props }, ref) => { const formattedTime = timeHourMinute(ts, hour24Clock); let time = ''; @@ -35,7 +36,7 @@ export const Time = as<'span', TimeProps & ComponentProps>( } else if (yesterday(ts)) { time = `Yesterday ${formattedTime}`; } else { - time = `${timeDayMonYear(ts, dateFormatString)} ${formattedTime}`; + time = `${timeDayMonYear(ts, dateFormatString)}, ${formattedTime}`; } return ( @@ -43,7 +44,7 @@ export const Time = as<'span', TimeProps & ComponentProps>( as="time" className={classNames(css.Time, className)} size="T200" - priority="300" + priority={inheritPriority ? undefined : '300'} {...props} ref={ref} >