-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SDK] Add onClose callback to details modal (#5605)
CNCT-2444 CNCT-2444 <!-- start pr-codex --> --- ## PR-Codex overview This PR primarily introduces an `onClose` callback for the `ConnectButton` component's details modal, enhancing its functionality. It also improves the rendering of various components and adds tests for new features. ### Detailed summary - Added `onClose` callback to `ConnectButtonProps` for modal closure. - Updated `ConnectButton` to utilize the `onClose` callback. - Improved test coverage for `NetworkSwitcherButton` and `ChainIcon`. - Enhanced `fetchChainIcon` functionality to handle various icon resolvers. - Introduced `ChainActiveDot` for visual representation of active chains. - Updated `NetworkSelector` and `DetailsModal` components for better user experience. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
- Loading branch information
Showing
13 changed files
with
887 additions
and
236 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
"thirdweb": patch | ||
--- | ||
|
||
- Add onClose callback to Connect Details modal | ||
|
||
```tsx | ||
<ConnectButton | ||
detailsModal={{ | ||
onClose: (screen: string) => { | ||
// The last screen name that was being shown when user closed the modal | ||
console.log({ screen }); | ||
} | ||
}} | ||
/> | ||
``` | ||
|
||
- Small fix for ChainIcon: Always resolve IPFS URI | ||
|
||
- Improve test coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.