TokenInput component allows users to input token amounts and select tokens from a list.
It displays the token input field, token balance, and a dropdown list of available tokens.
Param: props
TokenInput component props.
Param: props.thousandSeparator
Optional flag to enable thousands separator. Default is true.
Param: props.title
The title of the token input.
Param: props.currentNetworkId
The current network id. Default is mainnet's id.
Param: props.onTokenSelect
Callback function to be called when a token is selected.
Param: props.networks
Optional list of networks to display in the dropdown. The dropdown won't show up if undefined. Default is undefined.
Param: props.placeholder
Optional placeholder text for the search input. Default is 'Search by name or address'.
Param: props.containerHeight
Optional height of the virtualized tokens list. Default is 320.
Param: props.iconSize
Optional size of the token icon in the list. Default is 32.
Param: props.itemHeight
Optional height of each item in the list. Default is 64.
Param: props.showAddTokenButton
Optional flag to allow adding a token. Default is false.
Param: props.showBalance
Optional flag to show the token balance in the list. Default is false.
Param: props.showTopTokens
Optional flag to show the top tokens in the list. Default is false.
TokenInput component allows users to input token amounts and select tokens from a list. It displays the token input field, token balance, and a dropdown list of available tokens.