asi-calculator/features/strategies/components/FormMarket.tsx

29 lines
669 B
TypeScript
Raw Normal View History

2024-04-01 14:42:08 +02:00
import { Dispatch, SetStateAction } from 'react'
2024-04-01 15:49:03 +02:00
import { Select, FormInline } from '@/components'
2024-04-01 14:42:08 +02:00
import { type Market } from '@/features/strategies'
2024-04-06 14:55:43 +02:00
const options = [
{ value: 'market', label: 'All Markets' },
2024-07-01 18:28:52 +02:00
{ value: 'migration', label: 'Migration Tool' },
2024-04-06 14:55:43 +02:00
{ value: 'uniswap-v3', label: 'Uniswap v3' }
]
2024-04-01 14:42:08 +02:00
export function FormMarket({
market,
setMarket
}: {
market: Market
setMarket: Dispatch<SetStateAction<Market>>
}) {
return (
2024-04-01 15:49:03 +02:00
<FormInline>
2024-04-01 14:42:08 +02:00
<Select
options={options}
value={market}
onChange={(e) => setMarket(e.target.value as Market)}
2024-04-06 14:55:43 +02:00
style={{ paddingRight: '1.2rem' }}
2024-04-01 14:42:08 +02:00
/>
2024-04-01 15:49:03 +02:00
</FormInline>
2024-04-01 14:42:08 +02:00
)
}