Skip to content

Commit 80d9ec7

Browse files
authored
Merge pull request #408 from reservoirprotocol/ted/relay-6448-taller-tokenchain-popup
Update token selector dimensions and breakpoints
2 parents 274bb94 + 73f94b2 commit 80d9ec7

File tree

5 files changed

+16
-10
lines changed

5 files changed

+16
-10
lines changed

.changeset/calm-monkeys-tan.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@reservoir0x/relay-kit-ui': patch
3+
---
4+
5+
Update token selector dimensions and breakpoints

packages/ui/src/components/common/TokenSelector/TokenSelector.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,15 +561,16 @@ const TokenSelector: FC<TokenSelectorProps> = ({
561561
trigger={trigger}
562562
css={{
563563
p: '4',
564-
sm: {
564+
overflowY: 'clip',
565+
'@media(min-width: 660px)': {
565566
minWidth:
566567
size === 'desktop'
567568
? configuredChainIds.length > 1
568-
? 568
569+
? 660
569570
: 378
570571
: 400,
571572
maxWidth:
572-
size === 'desktop' && configuredChainIds.length > 1 ? 568 : 378
573+
size === 'desktop' && configuredChainIds.length > 1 ? 660 : 378
573574
}
574575
}}
575576
>

packages/ui/src/components/common/TokenSelector/steps/SetChainStep.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export const SetChainStep: FC<SetChainStepProps> = ({
8686
selectedCurrencyList
8787
}) => {
8888
const client = useRelayClient()
89-
const isSmallDevice = useMediaQuery('(max-width: 600px)')
89+
const isSmallDevice = useMediaQuery('(max-width: 660px)')
9090
const isDesktop = size === 'desktop' && !isSmallDevice
9191

9292
const supportedChains = selectedCurrencyList?.chains || []
@@ -207,7 +207,7 @@ export const SetChainStep: FC<SetChainStepProps> = ({
207207
gridTemplateColumns: isDesktop ? 'repeat(2, minmax(0, 1fr))' : 'none',
208208
gridColumnGap: isDesktop ? '8px' : '0',
209209
gridAutoRows: 'min-content',
210-
height: 370,
210+
height: 530,
211211
overflowY: 'auto',
212212
pb: '2',
213213
gap: isDesktop ? '0' : '2',

packages/ui/src/components/common/TokenSelector/steps/SetCurrencyStep.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export const SetCurrencyStep: FC<SetCurrencyProps> = ({
8989
setCurrencyList,
9090
onAnalyticEvent
9191
}) => {
92-
const isSmallDevice = useMediaQuery('(max-width: 600px)')
92+
const isSmallDevice = useMediaQuery('(max-width: 660px)')
9393
const isDesktop = size === 'desktop' && !isSmallDevice
9494
const allChains = [
9595
{ id: undefined, name: 'All Chains' },
@@ -159,12 +159,12 @@ export const SetCurrencyStep: FC<SetCurrencyProps> = ({
159159
>
160160
Select Token
161161
</Text>
162-
<Flex css={{ width: '100%', gap: '3', height: '400px' }}>
162+
<Flex css={{ width: '100%', gap: '3', height: '530px' }}>
163163
{isDesktop && (!configuredChainIds || configuredChainIds.length > 1) ? (
164164
<>
165165
<Flex
166166
direction="column"
167-
css={{ maxWidth: 170, flexShrink: 0, gap: '1' }}
167+
css={{ maxWidth: 210, flexShrink: 0, gap: '1' }}
168168
>
169169
<AccessibleList
170170
onSelect={(value) => {

packages/ui/src/components/widgets/SwapWidget/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Flex, Button, Text, Box, Pill } from '../../primitives/index.js'
1+
import { Flex, Button, Text, Box } from '../../primitives/index.js'
22
import { useContext, useEffect, useState, type FC } from 'react'
33
import { useRelayClient } from '../../../hooks/index.js'
44
import type { Address } from 'viem'
@@ -22,7 +22,7 @@ import TokenSelectorContainer from '../TokenSelectorContainer.js'
2222
import FeeBreakdown from '../FeeBreakdown.js'
2323
import { mainnet } from 'viem/chains'
2424
import { PriceImpactTooltip } from '../PriceImpactTooltip.js'
25-
import { faClipboard, faPenToSquare } from '@fortawesome/free-solid-svg-icons'
25+
import { faClipboard } from '@fortawesome/free-solid-svg-icons'
2626
import { SwapWidgetTokenTrigger } from '../../common/TokenSelector/triggers/SwapWidgetTokenTrigger.js'
2727
import { ChainTrigger } from '../../common/TokenSelector/triggers/ChainTrigger.js'
2828
import type { AdaptedWallet } from '@reservoir0x/relay-sdk'

0 commit comments

Comments
 (0)