替换图标

This commit is contained in:
myf 2022-05-19 17:40:28 +08:00
parent ca57c445a2
commit 20ad6d8dea
2 changed files with 12 additions and 4 deletions

View File

@ -1,8 +1,7 @@
import React from "react"; import React from "react";
import styled from "styled-components"; import styled from "styled-components";
import { PancakeRoundIcon } from "../../../components/Svg";
import Text from "../../../components/Text/Text"; import Text from "../../../components/Text/Text";
import Skeleton from "../../../components/Skeleton/Skeleton"; import HighIcon from "../../../components/Svg/Icons/HighIcon";
interface Props { interface Props {
cakePriceUsd?: number; cakePriceUsd?: number;
@ -27,11 +26,19 @@ const CakePrice: React.FC<Props> = ({ cakePriceUsd }) => {
href="https://exchange.pancakeswap.finance/#/swap?outputCurrency=0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82" href="https://exchange.pancakeswap.finance/#/swap?outputCurrency=0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82"
target="_blank" target="_blank"
> >
<PancakeRoundIcon width="24px" mr="8px" /> <HighIcon width="24px" mr="8px" />
<Text color="textSubtle" bold>{`$${cakePriceUsd.toFixed(3)}`}</Text> <Text color="textSubtle" bold>{`$${cakePriceUsd.toFixed(3)}`}</Text>
</PriceLink> </PriceLink>
) : ( ) : (
<Skeleton width={80} height={24} /> <PriceLink
href="https://exchange.pancakeswap.finance/#/swap?outputCurrency=0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82"
target="_blank"
>
<HighIcon width="24px" mr="8px" />
<Text color="textSubtle" bold>
$0
</Text>
</PriceLink>
); );
}; };

View File

@ -118,6 +118,7 @@ const MoreDropDown: React.FC<Props> = ({ list }) => {
item.list && item.list.length > 0 && ( item.list && item.list.length > 0 && (
<SingleLink key={item.key} external href={item.list[0].link} color="textSubtle"> <SingleLink key={item.key} external href={item.list[0].link} color="textSubtle">
<Image src={item.icon} title={item.name} /> <Image src={item.icon} title={item.name} />
<TextDiv marginLeft="5px">{item.name}</TextDiv>
</SingleLink> </SingleLink>
) )
); );