Reorder attributes
This commit is contained in:
parent
ba86907ec2
commit
378d5a0c25
|
@ -5,17 +5,17 @@ import { ResolvedAddressRenderer } from "../api/address-resolver/address-resolve
|
||||||
import { TokenMeta } from "../types";
|
import { TokenMeta } from "../types";
|
||||||
|
|
||||||
type TokenNameProps = {
|
type TokenNameProps = {
|
||||||
|
address: string;
|
||||||
name: string;
|
name: string;
|
||||||
symbol: string;
|
symbol: string;
|
||||||
address: string;
|
|
||||||
linkable: boolean;
|
linkable: boolean;
|
||||||
dontOverrideColors?: boolean;
|
dontOverrideColors?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
const TokenName: React.FC<TokenNameProps> = ({
|
const TokenName: React.FC<TokenNameProps> = ({
|
||||||
|
address,
|
||||||
name,
|
name,
|
||||||
symbol,
|
symbol,
|
||||||
address,
|
|
||||||
linkable,
|
linkable,
|
||||||
dontOverrideColors,
|
dontOverrideColors,
|
||||||
}) => {
|
}) => {
|
||||||
|
@ -50,19 +50,21 @@ const TokenName: React.FC<TokenNameProps> = ({
|
||||||
|
|
||||||
type ContentProps = {
|
type ContentProps = {
|
||||||
address: string;
|
address: string;
|
||||||
linkable: boolean;
|
|
||||||
name: string;
|
name: string;
|
||||||
symbol: string;
|
symbol: string;
|
||||||
|
linkable: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
const Content: React.FC<ContentProps> = ({
|
const Content: React.FC<ContentProps> = ({
|
||||||
address,
|
address,
|
||||||
linkable,
|
|
||||||
name,
|
name,
|
||||||
symbol,
|
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} />
|
<TokenLogo address={address} name={name} />
|
||||||
</div>
|
</div>
|
||||||
<span className="truncate">
|
<span className="truncate">
|
||||||
|
@ -73,14 +75,14 @@ const Content: React.FC<ContentProps> = ({
|
||||||
|
|
||||||
export const tokenRenderer: ResolvedAddressRenderer<TokenMeta> = (
|
export const tokenRenderer: ResolvedAddressRenderer<TokenMeta> = (
|
||||||
address,
|
address,
|
||||||
resolvedAddress,
|
tokenMeta,
|
||||||
linkable,
|
linkable,
|
||||||
dontOverrideColors
|
dontOverrideColors
|
||||||
) => (
|
) => (
|
||||||
<TokenName
|
<TokenName
|
||||||
address={address}
|
address={address}
|
||||||
name={resolvedAddress.name}
|
name={tokenMeta.name}
|
||||||
symbol={resolvedAddress.symbol}
|
symbol={tokenMeta.symbol}
|
||||||
linkable={linkable}
|
linkable={linkable}
|
||||||
dontOverrideColors={dontOverrideColors}
|
dontOverrideColors={dontOverrideColors}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue