Skip to content

Commit e7b300d

Browse files
committed
qa feedback
1 parent 7764023 commit e7b300d

File tree

3 files changed

+38
-3
lines changed

3 files changed

+38
-3
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const Modal: FC<
2929
ModalProps &
3030
Pick<
3131
ComponentPropsWithoutRef<typeof AnimatedContent>,
32-
'onPointerDownOutside'
32+
'onPointerDownOutside' | 'onOpenAutoFocus'
3333
>
3434
> = ({
3535
trigger,
@@ -68,6 +68,7 @@ export const Modal: FC<
6868
}}
6969
disableAnimation={disableAnimation}
7070
onPointerDownOutside={props.onPointerDownOutside}
71+
onOpenAutoFocus={props.onOpenAutoFocus}
7172
>
7273
{showCloseButton ? (
7374
<DialogClose

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ const MobileChainRow: FC<MobileChainRowProps> = ({
426426
size="none"
427427
css={{
428428
py: '3',
429+
px: '2',
429430
display: 'flex',
430431
alignItems: 'center',
431432
gap: '2',
@@ -465,6 +466,7 @@ const MobileChainRow: FC<MobileChainRowProps> = ({
465466
onTouchMove={handleTouchMove}
466467
css={{
467468
py: '3',
469+
px: '2',
468470
display: 'flex',
469471
alignItems: 'center',
470472
gap: '2',

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

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@ import {
66
useMemo,
77
useState
88
} from 'react'
9-
import { Flex, Text, Input, Box, Button } from '../../primitives/index.js'
9+
import {
10+
Flex,
11+
Text,
12+
Input,
13+
Box,
14+
Button,
15+
ChainIcon
16+
} from '../../primitives/index.js'
1017
import { Modal } from '../Modal.js'
1118
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
1219
import {
@@ -509,6 +516,11 @@ const TokenSelector: FC<TokenSelectorProps> = ({
509516
onOpenChange={onOpenChange}
510517
showCloseButton={isDesktop}
511518
disableAnimation={!isDesktop}
519+
onOpenAutoFocus={(e) => {
520+
if (!isDesktop) {
521+
e.preventDefault()
522+
}
523+
}}
512524
trigger={trigger}
513525
css={{
514526
p: '4',
@@ -705,6 +717,25 @@ const TokenSelector: FC<TokenSelectorProps> = ({
705717
context={context}
706718
/>
707719
) : null}
720+
721+
{/* Selected Chain Header - Only show on mobile when specific chain is selected */}
722+
{!isDesktop && chainFilter.id !== undefined ? (
723+
<Flex
724+
align="center"
725+
css={{
726+
gap: '2',
727+
pb: '1',
728+
width: '100%'
729+
}}
730+
>
731+
<Text style="subtitle2" color="subtle">
732+
Tokens on{' '}
733+
{('displayName' in chainFilter &&
734+
chainFilter.displayName) ||
735+
chainFilter.name}
736+
</Text>
737+
</Flex>
738+
) : null}
708739
</Flex>
709740

710741
{/* Token Lists Section */}
@@ -715,7 +746,8 @@ const TokenSelector: FC<TokenSelectorProps> = ({
715746
flex: 1,
716747
overflowY: 'auto',
717748
gap: '3',
718-
pt: '2',
749+
pt:
750+
!isDesktop && chainFilter.id !== undefined ? '0' : '2',
719751
scrollbarColor: 'var(--relay-colors-gray5) transparent'
720752
}}
721753
>

0 commit comments

Comments
 (0)