Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

Commit

Permalink
style: text-left
Browse files Browse the repository at this point in the history
  • Loading branch information
PwFaze committed Jul 28, 2023
1 parent abe3b95 commit 4063c22
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/components/Article/Cover/components/ArticleBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,24 @@ function ArticleBlock({ article, index }: ArticleBlockProps) {
{article.preinfo}
</div>
<div
className="overflow-hidden text-left"
ref={fullInfoRef}
style={{
transition: 'max-height 0.3s ease-in-out',
maxHeight: expanded
? fullInfoRef.current?.scrollHeight + 'px'
: '0',
overflow: 'hidden',
transition: 'max-height 0.3s ease-in-out',
}}
>
<Image
src={article.img}
width={200}
height={200}
alt={article.topic}
className="my-4 w-full"
/>
{article.img && (
<Image
src={article.img}
width={200}
height={200}
alt={article.topic}
className="my-4 w-full"
/>
)}
{article.fullinfo}
</div>
</button>
Expand Down

0 comments on commit 4063c22

Please sign in to comment.