Skip to content

Commit

Permalink
Make Transaction component clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcoderistov committed Oct 18, 2022
1 parent 93c8037 commit 57e181a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Transaction/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ interface TransactionProps {
buyTokenThumbnail: string
buyAmount: string
status: 'pending' | 'confirmed'
onClick: () => void
}

export default function Transaction ({sellTokenSymbol, sellTokenThumbnail, sellAmount,
buyTokenSymbol, buyTokenThumbnail, buyAmount, status, ...rest}: TransactionProps & BoxProps) {
buyTokenSymbol, buyTokenThumbnail, buyAmount, status, onClick, ...rest}: TransactionProps & BoxProps) {

const pending = status === 'pending'

Expand All @@ -27,6 +28,8 @@ export default function Transaction ({sellTokenSymbol, sellTokenThumbnail, sellA
justifyContent='space-between'
alignItems='center'
{...rest}
sx={{ '&:hover': { backgroundColor: '#2C2F36' }, cursor: 'pointer', paddingY: '10px', borderRadius: '10px', paddingX: '5px' }}
onClick={onClick}
>
<Box
component='div'
Expand Down

0 comments on commit 57e181a

Please sign in to comment.