Reduced information text size on mobile

This commit is contained in:
James Ketr 2025-07-16 19:08:20 -07:00
parent 33d91d1cbb
commit 0fc43b84ad

View File

@ -15,7 +15,7 @@ import CardContent from '@mui/material/CardContent';
import Collapse from '@mui/material/Collapse'; import Collapse from '@mui/material/Collapse';
import { ExpandMore } from './ExpandMore'; import { ExpandMore } from './ExpandMore';
import JsonView from '@uiw/react-json-view'; 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 { useTheme } from '@mui/material/styles';
import { SxProps, Theme } from '@mui/material'; import { SxProps, Theme } from '@mui/material';
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
@ -44,6 +44,7 @@ const getStyle = (
theme: Theme, theme: Theme,
type: ApiActivityType | ChatSenderType | 'error' type: ApiActivityType | ChatSenderType | 'error'
): Record<string, string> => { ): Record<string, string> => {
const isMobile = useMediaQuery(theme.breakpoints.down('md'));
const defaultRadius = '16px'; const defaultRadius = '16px';
const defaultStyle = { const defaultStyle = {
padding: theme.spacing(1, 2), padding: theme.spacing(1, 2),
@ -109,6 +110,7 @@ const getStyle = (
borderRadius: defaultRadius, borderRadius: defaultRadius,
color: theme.palette.text.primary, color: theme.palette.text.primary,
opacity: 0.95, opacity: 0.95,
fontSize: isMobile ? '0.75rem' : '0.85rem',
}, },
info: 'information', info: 'information',
preparing: 'status', preparing: 'status',