fix the color of dark mode

This commit is contained in:
Yifei Hu 2024-07-10 12:59:34 +08:00
parent e14bb334ba
commit 10b38e392a
2 changed files with 9 additions and 9 deletions

View file

@ -39,14 +39,14 @@ interface NewsDetailProps {
const NewsDetail: React.FC<NewsDetailProps> = ({ news }) => {
return (
<article className="prose lg:prose-xl">
<h1>{news.title}</h1>
<article className="prose lg:prose-xl dark:prose-invert">
<h1 className="text-black dark:text-white">{news.title}</h1>
{news.sections.map((section, index) => (
<section key={index}>
<h2>{section.title}</h2>
<p>{section.content}</p>
<h2 className="text-black dark:text-white">{section.title}</h2>
<p className="text-black dark:text-white">{section.content}</p>
<div className="mt-4">
<h3>Related Context:</h3>
<h3 className="text-black dark:text-white">Related Context:</h3>
{section.context.map((item, i) => (
<ContextItem key={i} item={item} />
))}