fix: corrigé couleur texte markdown timeline

- Ajout useTheme pour accès aux couleurs Material-UI
- Utilisation theme.palette.text.secondary pour le markdown
- Compatible thèmes sombre et clair
- Texte markdown maintenant lisible sur tous fonds
This commit is contained in:
2025-07-24 11:34:08 +04:00
parent cd8fd59a7f
commit af7189dd6e
+4 -1
View File
@@ -1,4 +1,5 @@
import {useRef, useState} from 'react' import {useRef, useState} from 'react'
import {useTheme} from '@mui/material/styles'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import Box from '@mui/material/Box' import Box from '@mui/material/Box'
import Typography from '@mui/material/Typography' import Typography from '@mui/material/Typography'
@@ -113,6 +114,7 @@ function VersionCard({
setVersionCompare, setVersionCompare,
onVoteResult onVoteResult
}) { }) {
const theme = useTheme()
const status = getVersionStatus(version, index, totalVersions) const status = getVersionStatus(version, index, totalVersions)
const statusConfig = getStatusConfig(status) const statusConfig = getStatusConfig(status)
@@ -223,9 +225,10 @@ function VersionCard({
</Box> </Box>
</Box> </Box>
<Box sx={{mb: 2, '& > div': {fontSize: '0.875rem', fontStyle: 'italic', color: 'text.secondary'}}}> <Box sx={{mb: 2, '& > div': {fontSize: '0.875rem', fontStyle: 'italic'}}}>
<MarkdownRenderer <MarkdownRenderer
content={contentPreview} content={contentPreview}
color={theme.palette.text.secondary}
fallbackComponent={({children, ...props}) => ( fallbackComponent={({children, ...props}) => (
<Typography <Typography
variant='body2' variant='body2'