Rainbow logo
RainbowKit
2.2.10

钱包按钮

钱包按钮

注意:WalletButton 目前依赖于 EIP-1193 钱包标准,但不久将支持 EIP-6963。

新的 WalletButton 组件帮助 dApps 通过自定义钱包列表实现采用 RainbowKit,享受其免维护的所有好处。

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

ConnectButton 相似,WalletButton.Custom 组件可用于自定义实现和样式。

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

大多数 dApp 最好使用 ConnectButton。点击这里查看关于 WalletButton 采用和用例的更多信息。

按下下面的按钮,看一下这个 RainbowKit 入口点的外观。