Skip to content

Commit 4ac4e54

Browse files
committed
chore: refactor chakra IconButton
1 parent ce48648 commit 4ac4e54

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

src/components/settings/index.tsx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {
22
Flex,
3-
IconButton,
43
Input,
54
Popover,
65
PopoverBody,
@@ -72,15 +71,9 @@ export const Settings = (props: SettingsProps) => {
7271
return (
7372
<Popover placement='bottom-end'>
7473
<PopoverTrigger>
75-
<IconButton
76-
aria-label='Trade Settings'
77-
icon={
78-
<Cog8ToothIcon className='dark:text-ic-gray-400 text-ic-black m-1.5 size-4' />
79-
}
80-
size='sm'
81-
style={{ border: 0 }}
82-
variant='unstyled'
83-
/>
74+
<button aria-label='Trade Settings' className='my-0.5 mr-1'>
75+
<Cog8ToothIcon className='dark:text-ic-gray-400 text-ic-black m-1.5 size-4' />
76+
</button>
8477
</PopoverTrigger>
8578
<PopoverContent
8679
bg={'linear-gradient(187deg, #FCFFFF -184.07%, #F7F8F8 171.05%)'}

src/components/swap/index.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Flex, IconButton, Text } from '@chakra-ui/react'
1+
import { Flex, Text } from '@chakra-ui/react'
22
import { ChevronUpDownIcon } from '@heroicons/react/20/solid'
33
import { useAtom } from 'jotai'
44
import { useCallback, useEffect, useState } from 'react'
@@ -225,13 +225,13 @@ export const Swap = (props: SwapProps) => {
225225
}}
226226
/>
227227
<div className='flex h-1.5 self-center'>
228-
<IconButton
229-
className='bg-ic-white text-ic-gray-400'
230-
margin={'-16px 0 0 0'}
228+
<button
229+
className='text-ic-gray-400 border-ic-gray-400 bg-ic-white hover:bg-ic-gray-100 relative z-50 flex self-center rounded-lg border px-2 py-1'
231230
aria-label='switch input/output tokens'
232-
icon={<ChevronUpDownIcon className='h-7 w-5 text-gray-500' />}
233231
onClick={onSwitchTokens}
234-
/>
232+
>
233+
<ChevronUpDownIcon className='h-7 w-5 text-gray-500' />
234+
</button>
235235
</div>
236236
<TradeOutput
237237
caption={'You receive'}

0 commit comments

Comments
 (0)