Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/fix/swap-input-update' into tmp/…
Browse files Browse the repository at this point in the history
…20241226
  • Loading branch information
dmy147 committed Dec 26, 2024
2 parents 9903924 + ec8a847 commit 0ad3c3d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 21 deletions.
12 changes: 3 additions & 9 deletions src/ui/component/ChainIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ const ChainIconEle = styled.img`
width: 20px;
height: 20px;
}
&.mini {
width: 18px;
height: 18px;
}
`;

const AvaliableIcon = styled.div`
Expand All @@ -37,8 +33,7 @@ const AvaliableIcon = styled.div`
background: #27c193;
border-radius: 100%;
overflow: hidden;
&.small,
&.mini {
&.small {
width: 8px;
height: 8px;
}
Expand All @@ -54,8 +49,7 @@ const UnavaliableIcon = styled.div`
background: #ec5151;
border-radius: 100%;
overflow: hidden;
&.small,
&.mini {
&.small {
width: 8px;
height: 8px;
}
Expand Down Expand Up @@ -94,7 +88,7 @@ const TooltipContent = styled.div`
interface Props {
chain: CHAINS_ENUM;
customRPC?: string | undefined;
size?: 'normal' | 'small' | 'mini';
size?: 'normal' | 'small';
showCustomRPCToolTip?: boolean;
nonce?: number;
innerClassName?: string;
Expand Down
22 changes: 13 additions & 9 deletions src/ui/component/ChainSelector/InForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const ChainWrapper = styled.div`
cursor: pointer;
font-size: 16px;
font-weight: 500;
&.mini {
&.bridge {
width: auto;
height: 28px;
font-size: 13px;
Expand Down Expand Up @@ -98,14 +98,14 @@ export const ChainRender = ({
readonly,
className,
arrowDownComponent,
mini,
bridge,
swap,
...other
}: {
chain?: CHAINS_ENUM;
readonly: boolean;
arrowDownComponent?: React.ReactNode;
mini?: boolean;
bridge?: boolean;
swap?: boolean;
} & InsHTMLAttributes<HTMLDivElement>) => {
const wallet = useWallet();
Expand All @@ -131,7 +131,7 @@ export const ChainRender = ({
className={clsx(
{
'cursor-default hover:bg-r-neutral-bg-2': readonly,
mini,
bridge,
swap,
},
className
Expand All @@ -143,10 +143,14 @@ export const ChainRender = ({
<ChainIcon
chain={chain}
customRPC={customRPC}
size={swap ? 'mini' : 'small'}
size={'small'}
innerClassName={clsx(
bridge && 'w-[16px] h-[16px]',
swap && 'w-[18px] h-[18px]'
)}
showCustomRPCToolTip
tooltipProps={{
visible: swap || mini ? false : undefined,
visible: swap || bridge ? false : undefined,
}}
/>
)}
Expand Down Expand Up @@ -175,7 +179,7 @@ interface ChainSelectorProps {
title?: React.ReactNode;
chainRenderClassName?: string;
arrowDownComponent?: React.ReactNode;
mini?: boolean;
bridge?: boolean;
hideTestnetTab?: boolean;
excludeChains?: CHAINS_ENUM[];
drawerHeight?: number;
Expand All @@ -192,7 +196,7 @@ export default function ChainSelectorInForm({
supportChains,
chainRenderClassName,
arrowDownComponent,
mini,
bridge,
hideTestnetTab = false,
excludeChains,
drawerHeight,
Expand Down Expand Up @@ -225,7 +229,7 @@ export default function ChainSelectorInForm({
readonly={readonly}
className={chainRenderClassName}
arrowDownComponent={arrowDownComponent}
mini={mini}
bridge={bridge}
swap={swap}
/>
{!readonly && (
Expand Down
4 changes: 2 additions & 2 deletions src/ui/component/TokenSelector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ const TokenSelector = ({
<div className="filters-wrapper">
{chainItem && !['swapTo', 'bridgeFrom'].includes(type) && (
<>
<div className="filter-item__chain px-10 group">
<div className="filter-item__chain px-10">
<img
className="filter-item__chain-logo"
src={chainItem.logo}
Expand All @@ -388,7 +388,7 @@ const TokenSelector = ({
>
<RcIconChainFilterCloseCC
viewBox="0 0 16 16"
className="filter-item__chain-close w-[16px] h-[16px] ml-[2px] text-r-neutral-body group-hover:text-r-red-default"
className="filter-item__chain-close w-[16px] h-[16px] ml-[2px] text-r-neutral-body hover:text-r-red-default"
/>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/views/Bridge/Component/BridgeToken.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export const BridgeToken = ({
>
<span className="text-12 text-r-neutral-body">{name}</span>
<ChainSelectorInForm
mini
bridge
hideTestnetTab
value={chain}
onChange={changeChain}
Expand Down

0 comments on commit 0ad3c3d

Please sign in to comment.