mirror of
https://github.com/kremalicious/asi-calculator.git
synced 2024-12-23 09:51:43 +01:00
20 lines
384 B
TypeScript
20 lines
384 B
TypeScript
import { Dispatch, SetStateAction } from 'react'
|
|
import styles from './InputAmount.module.css'
|
|
|
|
export function InputAmount({
|
|
amount,
|
|
setAmount
|
|
}: {
|
|
amount: number
|
|
setAmount: Dispatch<SetStateAction<number>>
|
|
}) {
|
|
return (
|
|
<input
|
|
className={styles.input}
|
|
type="text"
|
|
value={amount}
|
|
onChange={(e) => setAmount(Number(e.target.value))}
|
|
/>
|
|
)
|
|
}
|