Make not-swappable tokens visually distinct

This commit is contained in:
Maximilian Schneider 2022-10-27 20:50:39 +02:00
parent a8b2670a84
commit 87c824033d
1 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,5 @@
import { memo, useMemo, useState, useEffect, ChangeEvent } from 'react'
import Image from "next/legacy/image";
import Image from 'next/legacy/image'
import { Token } from '../../types/jupiter'
import mangoStore from '@store/mangoStore'
import Input from '../forms/Input'
@ -61,7 +61,11 @@ const TokenItem = ({
<div>
<button
key={address}
className="default-transition flex w-full cursor-pointer items-center justify-between rounded-md p-2 font-normal focus:bg-th-bkg-3 focus:outline-none md:hover:bg-th-bkg-2"
className={`default-transition flex w-full items-center justify-between rounded-md p-2 font-normal ${
isDisabled
? 'opacity-50'
: 'cursor-pointer focus:bg-th-bkg-3 focus:outline-none md:hover:bg-th-bkg-2'
}`}
onClick={() => onSubmit(address)}
disabled={isDisabled}
>