Connect Modal
💡
It is recommended to use ConnectButton to render the connect/disconnect button.
Usage
import { useIsConnected, useConnectModal } from "@crossbell/connect-kit";
export function ConnectBtn() {
const isConnected = useIsConnected();
const { isActive, show, hide } = useConnectModal();
return isConnected ? null : <button onClick={show}>Connect</button>;
}
Return type
Option | Type | Description |
---|---|---|
isActive | boolean | Indicates whether the modal is activated or not |
show | () => void | Show modal |
hide | () => void | Hide modal |