@stablecoin.xyz/react
Version:
React hooks and components for SBC Account Abstraction
32 lines • 1.29 kB
TypeScript
import type { SupportedWalletType, WalletConnectionResult } from '@stablecoin.xyz/core';
export interface WalletButtonProps {
/** Wallet type to connect to ('auto' for automatic detection) */
walletType?: SupportedWalletType;
/** Custom className for styling */
className?: string;
/** Callback when wallet connection succeeds */
onConnect?: (result: WalletConnectionResult) => void;
/** Callback when wallet connection fails */
onError?: (error: Error) => void;
/** Custom button text */
children?: React.ReactNode;
/** Show loading state */
showLoading?: boolean;
/** Disabled state */
disabled?: boolean;
/** Custom render prop for full control */
render?: (props: {
onClick: () => void;
isConnecting: boolean;
disabled: boolean;
children: React.ReactNode;
className: string;
}) => React.ReactNode;
}
/**
* WalletButton - Simple button component for connecting to wallets
*
* Automatically detects available wallets and connects with one click
*/
export declare function WalletButton({ walletType, className, onConnect, onError, children, showLoading, disabled, render, }: WalletButtonProps): import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=WalletButton.d.ts.map