Cmen
3 years ago
2 changed files with 39 additions and 4 deletions
@ -0,0 +1,19 @@ |
|||||||
|
import { Input } from "antd"; |
||||||
|
import { useState } from "react"; |
||||||
|
|
||||||
|
export type FineInputProps = { |
||||||
|
value: string | number; |
||||||
|
onChange: (value: string) => void; |
||||||
|
}; |
||||||
|
|
||||||
|
export const FineInput = (props: FineInputProps) => { |
||||||
|
const [value, setValue] = useState(props.value); |
||||||
|
|
||||||
|
return ( |
||||||
|
<Input |
||||||
|
value={value} |
||||||
|
onChange={(e) => setValue(e.target.value)} |
||||||
|
onBlur={(e) => props.onChange(e.target.value)} |
||||||
|
/> |
||||||
|
); |
||||||
|
}; |
Loading…
Reference in new issue