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

28 lines
618 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' },
{ 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
)
}