diff --git a/.changeset/sixty-zoos-tap.md b/.changeset/sixty-zoos-tap.md new file mode 100644 index 000000000..8b7fec30b --- /dev/null +++ b/.changeset/sixty-zoos-tap.md @@ -0,0 +1,5 @@ +--- +'@reservoir0x/relay-kit-ui': patch +--- + +Fix token overflow ui bug on token selector diff --git a/packages/ui/src/components/common/TokenSelector/TokenSelector.tsx b/packages/ui/src/components/common/TokenSelector/TokenSelector.tsx index 1201ae2e1..3b8f2da95 100644 --- a/packages/ui/src/components/common/TokenSelector/TokenSelector.tsx +++ b/packages/ui/src/components/common/TokenSelector/TokenSelector.tsx @@ -561,7 +561,10 @@ const TokenSelector: FC = ({ trigger={trigger} css={{ p: '4', - overflowY: 'clip', + display: 'flex', + flexDirection: 'column', + height: 'auto', + maxHeight: 'min(85vh, 600px)', '@media(min-width: 660px)': { minWidth: size === 'desktop' @@ -581,7 +584,8 @@ const TokenSelector: FC = ({ width: '100%', height: '100%', gap: '3', - position: 'relative' + position: 'relative', + overflowY: 'hidden' }} > {tokenSelectorStep === TokenSelectorStep.SetCurrency ? ( diff --git a/packages/ui/src/components/common/TokenSelector/steps/SetChainStep.tsx b/packages/ui/src/components/common/TokenSelector/steps/SetChainStep.tsx index 4230b4efa..82eb2cab1 100644 --- a/packages/ui/src/components/common/TokenSelector/steps/SetChainStep.tsx +++ b/packages/ui/src/components/common/TokenSelector/steps/SetChainStep.tsx @@ -207,7 +207,7 @@ export const SetChainStep: FC = ({ gridTemplateColumns: isDesktop ? 'repeat(2, minmax(0, 1fr))' : 'none', gridColumnGap: isDesktop ? '8px' : '0', gridAutoRows: 'min-content', - height: 530, + maxHeight: 530, overflowY: 'auto', pb: '2', gap: isDesktop ? '0' : '2', diff --git a/packages/ui/src/components/common/TokenSelector/steps/SetCurrencyStep.tsx b/packages/ui/src/components/common/TokenSelector/steps/SetCurrencyStep.tsx index 932de20de..ab2a7f274 100644 --- a/packages/ui/src/components/common/TokenSelector/steps/SetCurrencyStep.tsx +++ b/packages/ui/src/components/common/TokenSelector/steps/SetCurrencyStep.tsx @@ -159,7 +159,9 @@ export const SetCurrencyStep: FC = ({ > Select Token - + {isDesktop && (!configuredChainIds || configuredChainIds.length > 1) ? ( <>