blob: f04c68fa2491beb0fd59c1a80e6cec3cb70d3ac0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import { useState } from "react";
import TextField from "@mui/material/TextField";
import { NumericFormat } from "react-number-format";
function SalaryInput() {
const [displayValue, setDisplayValue] = useState('');
return (
<NumericFormat
customInput={ TextField }
label='Gaji Bulanan'
variant="outlined"
valueIsNumericString={true}
thousandSeparator={true}
value={displayValue}
onValueChange={(value, sourceInfo) => {setDisplayValue(value.value)}}
InputProps={{
startAdornment: <span>Rp</span>
}}
/>
);
}
export default SalaryInput;
|