Skip to content

Commit 5e21dc9

Browse files
committed
Dark theme titles
1 parent 7f20e19 commit 5e21dc9

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

src/card/view/CardViewHeader.tsx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useEffect } from 'react';
22
import { Badge, CardHeader, Dialog, DialogContent, DialogTitle, TextField, Tooltip } from '@mui/material';
33
import debounce from 'lodash/debounce';
44
import { useCallback } from 'react';
5-
import { Close } from '@mui/icons-material';
5+
import { Close, ThirteenMp } from '@mui/icons-material';
66
import ReactMarkdown from 'react-markdown';
77
import gfm from 'remark-gfm';
88
import { replaceDashboardParameters } from '../../chart/ChartUtils';
@@ -17,6 +17,7 @@ import {
1717
CameraIconSolid,
1818
InformationCircleIconOutline,
1919
} from '@neo4j-ndl/react/icons';
20+
import { createTheme, ThemeProvider } from '@mui/material/styles';
2021

2122
const NeoCardViewHeader = ({
2223
title,
@@ -61,8 +62,20 @@ const NeoCardViewHeader = ({
6162
}
6263
}, [title]);
6364

65+
const theme = createTheme({
66+
typography: {
67+
fontFamily: "'Nunito Sans', sans-serif !important",
68+
allVariants: { color: 'rgb(var(--palette-neutral-text-weak))' },
69+
},
70+
palette: {
71+
text: {
72+
primary: 'rgb(var(--palette-neutral-text-weaker))',
73+
},
74+
},
75+
});
76+
6477
const cardTitle = (
65-
<>
78+
<ThemeProvider theme={theme}>
6679
<table style={{ width: '100%' }}>
6780
<tbody>
6881
<tr>
@@ -103,7 +116,7 @@ const NeoCardViewHeader = ({
103116
</tr>
104117
</tbody>
105118
</table>
106-
</>
119+
</ThemeProvider>
107120
);
108121

109122
const descriptionEnabled = description && description.length > 0;

0 commit comments

Comments
 (0)