TokenRow
A component for displaying token information in a row layout with optional balance display.
TokenRow
The TokenRow component displays token information in a row layout, combining a TokenChip with optional balance information.
Usage
Props
Prop | Type | Default | Description |
---|---|---|---|
chain_id | number | - | Chain ID of the token |
address | string | - | Token contract address |
name | string | - | Token name |
symbol | string | - | Token symbol |
balance | BigNumber | - | Token balance (optional) |
onClick | () => void | - | Click handler (optional) |
className | string | - | Additional CSS classes |
Features
- Displays token information using TokenChip
- Shows token balance with 3 decimal places
- Supports click interactions
- Flexible styling with Tailwind CSS
- Responsive layout with proper alignment
Examples
Basic Display
With Balance
Interactive Row
In a List
Layout Structure
The component uses a flex layout with:
- Left side: TokenChip (icon, name, and symbol)
- Right side (if balance provided):
- Token balance (3 decimal places)
- USD value (currently hardcoded to $0)
- Proper spacing and alignment
- Optional hover and click interactions
Edit on GitHub
Last updated on