Rainbow logo
RainbowKit
2.2.5

WalletButton

WalletButton

注意:WalletButton 目前依賴於 EIP-1193 錢包標準,但很快將支援EIP-6963。

全新的 WalletButton 組件幫助 dApp 在自定義錢包列表的實施中採用 RainbowKit 及其所有免維護的優勢。

import { WalletButton } from '@rainbow-me/rainbowkit';
<WalletButton wallet="rainbow" />
<WalletButton wallet="metamask" />
<WalletButton wallet="coinbase" />

如同 ConnectButtonWalletButton.Custom 組件適用於自定義實作和樣式。

<WalletButton.Custom wallet="rainbow">
{({ ready, connect }) => {
return (
<button type="button" disabled={!ready} onClick={connect} >
Connect Rainbow
</button>
);
}}
</WalletButton.Custom>

大多數 dApps 都最佳化為使用 ConnectButton。 參考 說明文件 獲取更多關於WalletButton採用和使用案例的信息。

按下面的按鈕以查看此RainbowKit入口點的樣子。