import Button from '@tw/Button' import ButtonLoadingDots from '@/components/buttons/ButtonLoadingDots' import { usePendingTxWrapper } from '@hooks/usePendingTxWrapper' import { TransactionResponse } from '@ethersproject/providers' import { CSSProperties } from 'react' import { joinClassNames } from '@/utils/joinClassNames' const baseClassNames = { flex: 'flex justify-center items-center', space: 'w-full rounded-md px-4 py-3 my-1', hover: 'hover:opacity-80', disabled: 'disabled:opacity-50 disabled:cursor-not-allowed', background: 'bg-zinc-400 dark:bg-bgLight', gradient: 'enabled:bg-gradient-to-r', transition: 'transition', } export const TransactionButton = ({ className, onClick, pendingLabel, label, onSuccess, disabled, chainId, style, ...props }: { className?: string onClick: () => Promise pendingLabel: string label: string onSuccess?: () => void chainId?: number style?: CSSProperties disabled?: boolean }) => { const [isPending, pendingTxWrapFunc] = usePendingTxWrapper() return ( ) }