wgm-swap-components
Version:
A React component library for token swap interfaces
65 lines (64 loc) • 1.21 kB
TypeScript
import React from 'react';
export interface TokenInputProps {
/**
* Input field label
*/
label: string;
/**
* Token symbol (e.g., 'ETH', 'USDC')
*/
symbol: string;
/**
* Token name (e.g., 'Ethereum', 'USD Coin')
*/
name: string;
/**
* Token logo URL
*/
logoUrl?: string;
/**
* Current input value
*/
value: string;
/**
* Token balance
*/
balance?: string;
/**
* Whether this input is disabled
*/
disabled?: boolean;
/**
* Input placeholder
*/
placeholder?: string;
/**
* Change handler
*/
onChange: (value: string) => void;
/**
* Max button click handler
*/
onMaxClick?: () => void;
/**
* Token selection handler
*/
onTokenSelect?: () => void;
/**
* Additional CSS classes
*/
className?: string;
/**
* Background color for the component
*/
backgroundColor?: string;
/**
* Text color for the component
*/
textColor?: string;
}
/**
* Token Input Component for swap forms
*/
export declare const TokenInput: React.FC<TokenInputProps>;
export default TokenInput;