Skip to content

Conversation

@PetarStoev02
Copy link
Contributor

Summary

  • Migrate ConnectWalletButton component to shadcn registry format
  • Extract types and utilities to separate files for better maintainability
  • Replace next/image with native img for framework-agnostic portability
  • Support multiple wallet types: MetaMask, WalletConnect, Coinbase Wallet, Phantom (Solana)

Changes

File Description
registry/w3-kit/connect-wallet/connect-wallet.tsx Main component with wallet connection logic
registry/w3-kit/connect-wallet/types.ts TypeScript interfaces (WalletType, ButtonVariant, ConnectWalletButtonProps)
registry/w3-kit/connect-wallet/utils.ts Variant styles, wallet icons, and helper functions
registry.json shadcn registry manifest
components.json shadcn configuration

Installation

npx shadcn@latest add @w3-kit/connect-wallet

Supported Wallets

  • MetaMask (EVM)
  • WalletConnect (EVM)
  • Coinbase Wallet (EVM)
  • Phantom (Solana)

Test plan

  • Verify component renders correctly with each wallet type
  • Test MetaMask connection flow
  • Test WalletConnect QR code flow
  • Test Coinbase Wallet connection
  • Test Phantom wallet connection (Solana)
  • Verify variant styles (ghost, light, dark)
  • Test error handling when wallet not installed

Closes #4

- Create registry structure for @w3-kit/connect-wallet component
- Extract types to separate file (WalletType, ButtonVariant, ConnectWalletButtonProps)
- Extract utilities to separate file (variantStyles, WALLET_ICONS, getDefaultLabel)
- Replace next/image with native img for portability
- Support MetaMask, WalletConnect, Coinbase Wallet, and Phantom (Solana)
- Add configurable WalletConnect config via props
- Add registry.json and components.json for shadcn configuration

Component can be installed via: npx shadcn@latest add @w3-kit/connect-wallet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Migration] Migrate ConnectWalletButton to shadcn registry

2 participants