Skip to content

Commit d9a63a6

Browse files
committed
[SDK] Fix props for TokenIcon component (#5493)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on fixing the issue where properties were not being passed correctly to the `TokenIcon` component. ### Detailed summary - Updated the return statement in the `Token/icon.tsx` file. - Changed `return <img src={iconQuery.data} alt={restProps.alt} />;` to `return <img src={iconQuery.data} {...restProps} alt={restProps.alt} />;` to ensure all `restProps` are included in the rendered `img` element. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 24f4e5a commit d9a63a6

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/seven-olives-applaud.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Fix props not getting passed to TokenIcon

packages/thirdweb/src/react/web/ui/prebuilt/Token/icon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,5 +160,5 @@ export function TokenIcon({
160160
return fallbackComponent || null;
161161
}
162162

163-
return <img src={iconQuery.data} alt={restProps.alt} />;
163+
return <img src={iconQuery.data} {...restProps} alt={restProps.alt} />;
164164
}

0 commit comments

Comments
 (0)