Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix show more #568

Merged
merged 2 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/happy-hounds-join.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@blobscan/web": patch
---

Fixed the issue where the "Show more" message was displayed incorrectly when the blob data container was opened and closed. The message now properly toggles between "Show more" when the container is closed and "Show less" when the container is open.
9 changes: 6 additions & 3 deletions apps/web/src/components/ExpandableContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@ export const ExpandableContent: FC<ExpandableElementProps> = function ({
className="flex cursor-pointer items-center gap-1 text-primary-400 transition-colors hover:text-primary-300 "
onClick={() => setOpened((opened) => !opened)}
>
Show More{" "}
{opened ? (
<ChevronUpIcon className="h-5 w-5" />
<>
Show More <ChevronUpIcon className="h-5 w-5" />
</>
) : (
<ChevronDownIcon className="h-5 w-5" />
<>
Show Less <ChevronDownIcon className="h-5 w-5" />
</>
)}
</div>
</div>
Expand Down
Loading