import type { ButtonProps } from 'antd'; import { Button } from 'antd'; import type { FC, MouseEventHandler } from 'react'; import React, { useCallback } from 'react'; import { useWalletModal } from './useWalletModal.js'; export const WalletModalButton: FC = ({ children = 'Select Wallet', type = 'primary', size = 'large', htmlType = 'button', onClick, ...props }) => { const { setVisible } = useWalletModal(); const handleClick: MouseEventHandler = useCallback( (event) => { if (onClick) onClick(event); if (!event.defaultPrevented) setVisible(true); }, [onClick, setVisible] ); return ( ); };