@funkit/connect
Version:
Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.
16 lines (15 loc) • 782 B
TypeScript
import { type RefObject } from 'react';
import type { FunInputChangeEvent } from '~/components/FunInput/FunInput';
import { type AmountInputDerivedState, type AmountInputInitOptions } from './state';
import { type InputAmountSuggestion } from './utils';
export interface UseAmountInputResult extends AmountInputDerivedState {
fontSize: number;
inputWidth: number | undefined;
onChange(event: FunInputChangeEvent): void;
ref: RefObject<HTMLInputElement>;
setFiatAmount(usdAmount: number): AmountInputDerivedState;
/** Possible user action to recover from the current error */
suggestion: InputAmountSuggestion | undefined;
toggleInputInFiat: () => void;
}
export declare function useAmountInput(options: AmountInputInitOptions): UseAmountInputResult;