From 67c6785bf3ba4e90db3f607e86e71b18426f5bd9 Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Thu, 25 Sep 2025 12:17:14 +0530 Subject: [PATCH] inherit font weight for time component --- src/app/components/message/Time.css.ts | 6 ++++++ src/app/components/message/Time.tsx | 13 +++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 src/app/components/message/Time.css.ts diff --git a/src/app/components/message/Time.css.ts b/src/app/components/message/Time.css.ts new file mode 100644 index 00000000..f2f5ac55 --- /dev/null +++ b/src/app/components/message/Time.css.ts @@ -0,0 +1,6 @@ +import { style } from '@vanilla-extract/css'; + +export const Time = style({ + fontWeight: 'inherit', + flexShrink: 0, +}); diff --git a/src/app/components/message/Time.tsx b/src/app/components/message/Time.tsx index 3eab5cc2..702e682d 100644 --- a/src/app/components/message/Time.tsx +++ b/src/app/components/message/Time.tsx @@ -1,6 +1,8 @@ import React, { ComponentProps } from 'react'; import { Text, as } from 'folds'; +import classNames from 'classnames'; import { timeDayMonYear, timeHourMinute, today, yesterday } from '../../utils/time'; +import * as css from './Time.css'; export type TimeProps = { compact?: boolean; @@ -22,7 +24,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, ...props }, ref) => { + ({ compact, hour24Clock, dateFormatString, ts, className, ...props }, ref) => { const formattedTime = timeHourMinute(ts, hour24Clock); let time = ''; @@ -37,7 +39,14 @@ export const Time = as<'span', TimeProps & ComponentProps>( } return ( - + {time} );