Skip to content

Commit f6305ac

Browse files
authored
Merge pull request #1820 from IndexCoop/chore/refactor-chakra-box
chore: refactor chakra box
2 parents 47d7aa5 + cdbc4f5 commit f6305ac

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/components/swap/components/trade-details/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
AccordionIcon,
55
AccordionItem,
66
AccordionPanel,
7-
Box,
87
Flex,
98
} from '@chakra-ui/react'
109
import { ExclamationTriangleIcon } from '@heroicons/react/20/solid'
@@ -95,7 +94,7 @@ export const TradeDetails = (props: TradeDetailsProps) => {
9594
height={16}
9695
/>
9796
)}
98-
<Box onClick={onToggleTokenPrice}>
97+
<div onClick={onToggleTokenPrice}>
9998
{isLoading ? (
10099
<StyledSkeleton width={200} />
101100
) : (
@@ -104,7 +103,7 @@ export const TradeDetails = (props: TradeDetailsProps) => {
104103
usdLabel={usdLabel}
105104
/>
106105
)}
107-
</Box>
106+
</div>
108107
</Flex>
109108
<div className={cn('flex gap-4', isExpanded && 'hidden')}>
110109
{!isLoading &&

src/components/swap/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Box, Flex, IconButton, Text } from '@chakra-ui/react'
1+
import { Flex, IconButton, Text } from '@chakra-ui/react'
22
import { ChevronUpDownIcon } from '@heroicons/react/20/solid'
33
import { useCallback, useEffect, useState } from 'react'
44
import { useDebounce } from 'use-debounce'
@@ -215,15 +215,15 @@ export const Swap = (props: SwapProps) => {
215215
if (inputTokenslist.length > 1) onOpenSelectInputToken()
216216
}}
217217
/>
218-
<Box h='6px' alignSelf={'center'}>
218+
<div className='flex h-1.5 self-center'>
219219
<IconButton
220220
className='bg-ic-white text-ic-gray-400'
221221
margin={'-16px 0 0 0'}
222222
aria-label='switch input/output tokens'
223223
icon={<ChevronUpDownIcon className='h-7 w-5 text-gray-500' />}
224224
onClick={onSwitchTokens}
225225
/>
226-
</Box>
226+
</div>
227227
<TradeOutput
228228
caption={'You receive'}
229229
selectedToken={outputToken}

0 commit comments

Comments
 (0)