Merge pull request #96 from blockworks-foundation/click-table-row

allow click table rows
This commit is contained in:
tlrsssss 2023-03-14 11:18:43 -04:00 committed by GitHub
commit 0f5e7074d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 25 deletions

View File

@ -93,8 +93,8 @@ const TokenList = () => {
</Tooltip> </Tooltip>
</div> </div>
</Th> </Th>
<Th className="bg-th-bkg-1 text-right">{t('trade:in-orders')}</Th> <Th className="text-right">{t('trade:in-orders')}</Th>
<Th className="bg-th-bkg-1 text-right">{t('trade:unsettled')}</Th> <Th className="text-right">{t('trade:unsettled')}</Th>
<Th className="flex justify-end" id="account-step-nine"> <Th className="flex justify-end" id="account-step-nine">
<Tooltip content="The sum of interest earned and interest paid for each token"> <Tooltip content="The sum of interest earned and interest paid for each token">
<span className="tooltip-underline"> <span className="tooltip-underline">
@ -109,7 +109,9 @@ const TokenList = () => {
</Tooltip> </Tooltip>
</div> </div>
</Th> </Th>
<Th /> <Th className="text-right">
<span className="pr-9">{t('actions')}</span>
</Th>
</TrHead> </TrHead>
</thead> </thead>
<tbody> <tbody>
@ -145,7 +147,11 @@ const TokenList = () => {
spotBalances[bank.mint.toString()]?.unsettled || 0 spotBalances[bank.mint.toString()]?.unsettled || 0
return ( return (
<TrBody className="last:border-y-0" key={bank.name}> <TrBody
className="default-transition md:hover:cursor-pointer md:hover:bg-th-bkg-2"
key={bank.name}
onClick={() => goToTokenPage(bank.name)}
>
<Td> <Td>
<div className="flex items-center"> <div className="flex items-center">
<div className="mr-2.5 flex flex-shrink-0 items-center"> <div className="mr-2.5 flex flex-shrink-0 items-center">
@ -210,14 +216,9 @@ const TokenList = () => {
</div> </div>
</Td> </Td>
<Td> <Td>
<div className="flex justify-end space-x-2"> <div className="flex items-center justify-end">
<ActionsMenu bank={bank} mangoAccount={mangoAccount} /> <ActionsMenu bank={bank} mangoAccount={mangoAccount} />
<IconButton <ChevronRightIcon className="ml-4 h-5 w-5 text-th-fgd-3" />
onClick={() => goToTokenPage(bank.name)}
size="small"
>
<ChevronRightIcon className="h-5 w-5" />
</IconButton>
</div> </div>
</Td> </Td>
</TrBody> </TrBody>
@ -479,6 +480,7 @@ const ActionsMenu = ({
{isUnownedAccount ? null : ( {isUnownedAccount ? null : (
<IconDropMenu <IconDropMenu
icon={<EllipsisHorizontalIcon className="h-5 w-5" />} icon={<EllipsisHorizontalIcon className="h-5 w-5" />}
panelClassName="w-40 shadow-md"
postion="leftBottom" postion="leftBottom"
> >
<div className="flex items-center justify-center border-b border-th-bkg-3 pb-2"> <div className="flex items-center justify-center border-b border-th-bkg-3 pb-2">

View File

@ -104,7 +104,11 @@ const PerpMarketsTable = ({
const openInterest = market.baseLotsToUi(market.openInterest) const openInterest = market.baseLotsToUi(market.openInterest)
return ( return (
<TrBody key={market.publicKey.toString()}> <TrBody
className="default-transition md:hover:cursor-pointer md:hover:bg-th-bkg-2"
key={market.publicKey.toString()}
onClick={() => setShowPerpDetails(perpMarkets[index])}
>
<Td> <Td>
<div className="flex items-center"> <div className="flex items-center">
<MarketLogos market={market} /> <MarketLogos market={market} />
@ -190,12 +194,7 @@ const PerpMarketsTable = ({
</Td> </Td>
<Td> <Td>
<div className="flex justify-end"> <div className="flex justify-end">
<IconButton <ChevronRightIcon className="h-5 w-5 text-th-fgd-3" />
onClick={() => setShowPerpDetails(perpMarkets[index])}
size="small"
>
<ChevronRightIcon className="h-5 w-5" />
</IconButton>
</div> </div>
</Td> </Td>
</TrBody> </TrBody>

View File

@ -112,7 +112,11 @@ const TokenStats = () => {
) )
return ( return (
<TrBody key={bank.name}> <TrBody
className="default-transition md:hover:cursor-pointer md:hover:bg-th-bkg-2"
key={bank.name}
onClick={() => goToTokenPage(bank)}
>
<Td> <Td>
<div className="flex items-center"> <div className="flex items-center">
<div className="mr-2.5 flex flex-shrink-0 items-center"> <div className="mr-2.5 flex flex-shrink-0 items-center">
@ -196,12 +200,7 @@ const TokenStats = () => {
</Td> </Td>
<Td> <Td>
<div className="flex justify-end"> <div className="flex justify-end">
<IconButton <ChevronRightIcon className="h-5 w-5 text-th-fgd-3" />
onClick={() => goToTokenPage(bank)}
size="small"
>
<ChevronRightIcon className="h-5 w-5" />
</IconButton>
</div> </div>
</Td> </Td>
</TrBody> </TrBody>