Skip to content

Commit 8091631

Browse files
committed
use headless buttons
1 parent 5e95160 commit 8091631

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/components/settings/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
PopoverContent,
77
PopoverTrigger,
88
} from '@chakra-ui/react'
9+
import { Button } from '@headlessui/react'
910
import { Cog8ToothIcon } from '@heroicons/react/20/solid'
1011
import { useMemo, useRef, useState } from 'react'
1112

@@ -70,9 +71,9 @@ export const Settings = (props: SettingsProps) => {
7071
return (
7172
<Popover placement='bottom-end'>
7273
<PopoverTrigger>
73-
<button aria-label='Trade Settings' className='my-0.5 mr-1'>
74+
<Button aria-label='Trade Settings' className='my-0.5 mr-1'>
7475
<Cog8ToothIcon className='dark:text-ic-gray-400 text-ic-black m-1.5 size-4' />
75-
</button>
76+
</Button>
7677
</PopoverTrigger>
7778
<PopoverContent
7879
bg={'linear-gradient(187deg, #FCFFFF -184.07%, #F7F8F8 171.05%)'}

src/components/swap/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Flex } from '@chakra-ui/react'
2+
import { Button } from '@headlessui/react'
23
import { ChevronUpDownIcon } from '@heroicons/react/20/solid'
34
import { useAtom } from 'jotai'
45
import { useCallback, useEffect, useState } from 'react'
@@ -225,13 +226,13 @@ export const Swap = (props: SwapProps) => {
225226
}}
226227
/>
227228
<div className='flex h-1.5 self-center'>
228-
<button
229+
<Button
229230
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'
230231
aria-label='switch input/output tokens'
231232
onClick={onSwitchTokens}
232233
>
233234
<ChevronUpDownIcon className='h-7 w-5 text-gray-500' />
234-
</button>
235+
</Button>
235236
</div>
236237
<TradeOutput
237238
caption={'You receive'}

0 commit comments

Comments
 (0)