import React, { useState } from 'react' import { ChevronDownIcon, ChevronUpIcon } from '@heroicons/react/24/solid' import Image from 'next/image' import Button from 'components/Button' import { formatCurrency } from 'utils/formatters' type AssetRowProps = { data: { denom: string symbol: string icon: string chain: string borrowed: { amount: number value: number } | null borrowRate: number marketLiquidity: number } onBorrowClick: () => void onRepayClick: (value: number) => void } const AssetRow = ({ data, onBorrowClick, onRepayClick }: AssetRowProps) => { const [isExpanded, setIsExpanded] = useState(false) return (
setIsExpanded((current) => !current)} >
token
{data.symbol}
{data.chain}
{data.borrowRate ? `${(data.borrowRate * 100).toFixed(2)}%` : '-'}
{data.borrowed ? (
{data.borrowed.amount}
{formatCurrency(data.borrowed.value)}
) : ( '-' )}
{data.marketLiquidity}
{isExpanded ? : }
{isExpanded && (
Additional Stuff Placeholder
)}
) } export default AssetRow