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

29 lines
668 B
TypeScript
Raw Normal View History

import { FormInline, Select } from '@/components'
import type { Market } from '@/features/strategies'
import type { Dispatch, SetStateAction } from 'react'
2024-04-01 14:42:08 +02:00
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' },
{ value: 'uniswap', label: 'Uniswap' }
2024-04-06 14:55:43 +02:00
]
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
)
}