diff --git a/src/components/tables/cells/logs/MessageCell.tsx b/src/components/tables/cells/logs/MessageCell.tsx index 7c2ab0df9..ab2452065 100644 --- a/src/components/tables/cells/logs/MessageCell.tsx +++ b/src/components/tables/cells/logs/MessageCell.tsx @@ -1,4 +1,5 @@ import { TableCell, Typography } from '@mui/material'; +import { jsonObjectPreview_key, jsonObjectPreview_value } from 'context/Theme'; import { isEmpty } from 'lodash'; import { ObjectPreview } from 'react-inspector'; import { BaseTypographySx } from './shared'; @@ -22,7 +23,29 @@ function MessageCell({ fields, message }: Props) { {!isEmpty(fields) ? ( - + span span:first-of-type': { + color: (theme) => + `${ + jsonObjectPreview_key[theme.palette.mode] + } !important`, + [`& + span`]: { + color: (theme) => + `${ + jsonObjectPreview_value[ + theme.palette.mode + ] + } !important`, + }, + }, + }} + > ) : null} diff --git a/src/context/Theme.tsx b/src/context/Theme.tsx index 01b367233..19939c35e 100644 --- a/src/context/Theme.tsx +++ b/src/context/Theme.tsx @@ -259,6 +259,16 @@ export const jsonViewTheme: { dark: `bright`, }; +// Based on the colors in the theme above +export const jsonObjectPreview_key = { + light: `rgb(26, 25, 26)`, + dark: `rgb(255, 255, 255)`, +}; +export const jsonObjectPreview_value = { + light: `rgb(246, 103, 30)`, + dark: `rgb(252, 109, 36)`, +}; + // Styles export const tableAlternateRowsSx: SxProps = {