From 0fc43b84ad2f4eb0031afb692a30e713206a6fcc Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Wed, 16 Jul 2025 19:08:20 -0700 Subject: [PATCH] Reduced information text size on mobile --- frontend/src/components/Message.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Message.tsx b/frontend/src/components/Message.tsx index c3e400d..18196ea 100644 --- a/frontend/src/components/Message.tsx +++ b/frontend/src/components/Message.tsx @@ -15,7 +15,7 @@ import CardContent from '@mui/material/CardContent'; import Collapse from '@mui/material/Collapse'; import { ExpandMore } from './ExpandMore'; import JsonView from '@uiw/react-json-view'; -import { Box } from '@mui/material'; +import { Box, useMediaQuery } from '@mui/material'; import { useTheme } from '@mui/material/styles'; import { SxProps, Theme } from '@mui/material'; import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; @@ -44,6 +44,7 @@ const getStyle = ( theme: Theme, type: ApiActivityType | ChatSenderType | 'error' ): Record => { + const isMobile = useMediaQuery(theme.breakpoints.down('md')); const defaultRadius = '16px'; const defaultStyle = { padding: theme.spacing(1, 2), @@ -109,6 +110,7 @@ const getStyle = ( borderRadius: defaultRadius, color: theme.palette.text.primary, opacity: 0.95, + fontSize: isMobile ? '0.75rem' : '0.85rem', }, info: 'information', preparing: 'status',