-
Notifications
You must be signed in to change notification settings - Fork 772
feat: internal component exports #2548
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
base: main
Are you sure you want to change the base?
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
c236b99 to
78926df
Compare
78926df to
721cb37
Compare
721cb37 to
9fab7c6
Compare
Refactors wallet connectors to use the new WalletFactory helper type, which preserves literal ID types through 'as const' assertions. This provides better type safety and enables stricter type checking for wallet identifiers throughout the codebase. Changes: - Add WalletFactory helper type to Wallet.ts - Add appName and appIcon to CreateWalletFn type for wallets that require them (baseAccount, coinbaseWallet, geminiWallet) - Convert all wallet connectors to use WalletFactory pattern - Flatten type definitions in baseAccount and coinbaseWallet - Update WalletButton components to work with new types - All wallet IDs now use 'as const' for literal type preservation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Adds new component exports and updates the build configuration to support separate component builds. Changes: - Export Avatar component with loading state support - Export AccountModal and ChainModal components - Add components/package.json for proper module resolution - Update build.js to support components build - Update src/components/index.ts with component re-exports - Update example to use typed wallet IDs with 'as const' This enables developers to use RainbowKit UI components individually in custom wallet connection flows. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
9fab7c6 to
1e3e71a
Compare
PR-Codex overview
This PR primarily focuses on refactoring the wallet connectors in the
rainbowkitpackage, enhancing type safety, and improving the structure of the code for better maintainability. It introduces a newWalletFactorytype for wallet creation and modifies several wallet connectors accordingly.Detailed summary
WalletFactorytype for wallet creation.satisfies Walletfor type safety.walletprop inWalletButtontoWalletId.AvatarPropsto useexport type.componentsentry inpackage.jsonfor better module exports.index.tsxfor better readability.