ListAPRColumn.tsx
1 import { ProtocolAction } from '@aave/contract-helpers'; 2 import { ReserveIncentiveResponse } from '@aave/math-utils/dist/esm/formatters/incentive/calculate-reserve-incentives'; 3 import { Box } from '@mui/material'; 4 import { ReactNode } from 'react'; 5 import { CustomMarket } from 'src/ui-config/marketsConfig'; 6 7 import { IncentivesCard } from '../../../components/incentives/IncentivesCard'; 8 import { ListColumn } from '../../../components/lists/ListColumn'; 9 10 interface ListAPRColumnProps { 11 value: number; 12 market: CustomMarket; 13 protocolAction: ProtocolAction; 14 address: string; 15 incentives?: ReserveIncentiveResponse[]; 16 symbol: string; 17 tooltip?: ReactNode; 18 children?: ReactNode; 19 } 20 21 export const ListAPRColumn = ({ 22 value, 23 market, 24 protocolAction, 25 address, 26 incentives, 27 symbol, 28 tooltip, 29 children, 30 }: ListAPRColumnProps) => { 31 return ( 32 <ListColumn> 33 <Box sx={{ display: 'flex column' }}> 34 <IncentivesCard 35 value={value} 36 incentives={incentives} 37 address={address} 38 symbol={symbol} 39 market={market} 40 protocolAction={protocolAction} 41 /> 42 {tooltip} 43 </Box> 44 {children} 45 </ListColumn> 46 ); 47 };