Adjust box size to perfectly fit article content and reduce spacing
Refactor Article component to remove unnecessary wrapper div and adjust paragraph margins for tighter content fitting, aligning with user feedback on excessive spacing. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 069d4324-6c40-4355-955e-c714a50de1ea Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3df548ff-50ae-432f-9be4-25d34eccc983/069d4324-6c40-4355-955e-c714a50de1ea/DGb2VKl
This commit is contained in:
BIN
article_content.png
Normal file
BIN
article_content.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 225 KiB |
@ -191,29 +191,27 @@ export default function Article() {
|
||||
)}
|
||||
</header>
|
||||
|
||||
<div className="prose prose-lg max-w-none">
|
||||
<div
|
||||
className="text-base leading-7 text-gray-800"
|
||||
data-testid="text-article-content"
|
||||
>
|
||||
{parseArticleContent(article.content).map((part, index) => {
|
||||
if (part.type === 'section') {
|
||||
return (
|
||||
<h3
|
||||
key={index}
|
||||
className="text-lg font-bold mt-8 mb-3 text-gray-900"
|
||||
>
|
||||
{part.content}
|
||||
</h3>
|
||||
);
|
||||
}
|
||||
<div
|
||||
className="text-base leading-7 text-gray-800"
|
||||
data-testid="text-article-content"
|
||||
>
|
||||
{parseArticleContent(article.content).map((part, index) => {
|
||||
if (part.type === 'section') {
|
||||
return (
|
||||
<p key={index} className="mb-4 whitespace-pre-wrap leading-7">
|
||||
<h3
|
||||
key={index}
|
||||
className="text-lg font-bold mt-8 mb-3 text-gray-900"
|
||||
>
|
||||
{part.content}
|
||||
</p>
|
||||
</h3>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
}
|
||||
return (
|
||||
<p key={index} className="mb-2 whitespace-pre-wrap leading-7">
|
||||
{part.content}
|
||||
</p>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</article>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user