Rainbow logo
RainbowKit
2.2.8

WalletButton

WalletButton

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

新的 WalletButton 元件協助 dApps 實施自定義的錢包列表,以採用 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 入口點的外觀。