Reorder attributes

This commit is contained in:
Willian Mitsuda 2021-11-01 01:32:35 -03:00
parent ba86907ec2
commit 378d5a0c25
1 changed files with 10 additions and 8 deletions

View File

@ -5,17 +5,17 @@ import { ResolvedAddressRenderer } from "../api/address-resolver/address-resolve
import { TokenMeta } from "../types";
type TokenNameProps = {
address: string;
name: string;
symbol: string;
address: string;
linkable: boolean;
dontOverrideColors?: boolean;
};
const TokenName: React.FC<TokenNameProps> = ({
address,
name,
symbol,
address,
linkable,
dontOverrideColors,
}) => {
@ -50,19 +50,21 @@ const TokenName: React.FC<TokenNameProps> = ({
type ContentProps = {
address: string;
linkable: boolean;
name: string;
symbol: string;
linkable: boolean;
};
const Content: React.FC<ContentProps> = ({
address,
linkable,
name,
symbol,
linkable,
}) => (
<>
<div className="self-center w-5 h-5">
<div
className={`self-center w-5 h-5 ${linkable ? "" : "filter grayscale"}`}
>
<TokenLogo address={address} name={name} />
</div>
<span className="truncate">
@ -73,14 +75,14 @@ const Content: React.FC<ContentProps> = ({
export const tokenRenderer: ResolvedAddressRenderer<TokenMeta> = (
address,
resolvedAddress,
tokenMeta,
linkable,
dontOverrideColors
) => (
<TokenName
address={address}
name={resolvedAddress.name}
symbol={resolvedAddress.symbol}
name={tokenMeta.name}
symbol={tokenMeta.symbol}
linkable={linkable}
dontOverrideColors={dontOverrideColors}
/>