2024-03-30 20:50:51 +01:00
|
|
|
import { InputAmount } from '@/components/FormAmount/Inputs/InputAmount'
|
|
|
|
import { InputToken } from './Inputs/InputToken'
|
2024-03-29 22:54:07 +01:00
|
|
|
import styles from './FormAmount.module.css'
|
2024-03-30 20:50:51 +01:00
|
|
|
import { Dispatch, SetStateAction } from 'react'
|
2024-03-31 16:48:31 +02:00
|
|
|
import { TokenSymbol } from '@/types'
|
2024-03-29 22:54:07 +01:00
|
|
|
|
|
|
|
export function FormAmount({
|
|
|
|
amount,
|
2024-03-30 20:50:51 +01:00
|
|
|
setAmount,
|
|
|
|
token,
|
|
|
|
setToken,
|
|
|
|
isFiat
|
2024-03-29 22:54:07 +01:00
|
|
|
}: {
|
|
|
|
amount: number
|
2024-03-30 20:50:51 +01:00
|
|
|
setAmount: Dispatch<SetStateAction<number>>
|
2024-03-31 16:48:31 +02:00
|
|
|
token: TokenSymbol | string
|
|
|
|
setToken?: Dispatch<SetStateAction<TokenSymbol>>
|
2024-03-30 20:50:51 +01:00
|
|
|
isFiat?: boolean
|
2024-03-29 22:54:07 +01:00
|
|
|
}) {
|
|
|
|
return (
|
|
|
|
<form className={styles.form}>
|
2024-03-30 20:50:51 +01:00
|
|
|
<InputAmount amount={amount} setAmount={setAmount} />
|
|
|
|
<InputToken token={token} setToken={setToken} isFiat={isFiat} />
|
2024-03-29 22:54:07 +01:00
|
|
|
</form>
|
|
|
|
)
|
|
|
|
}
|