diff options
author | Rosyid Haryadi <rosyid_haryadi@protonmail.com> | 2023-09-30 14:21:44 +0700 |
---|---|---|
committer | Rosyid Haryadi <rosyid_haryadi@protonmail.com> | 2023-09-30 14:21:44 +0700 |
commit | 63633dcd62e72a6c55533b50949630ed8d554328 (patch) | |
tree | 41563b0ca9124f7b7533345a8d2f6040779ddae6 /src/SalaryInput.jsx |
initial commit
Diffstat (limited to 'src/SalaryInput.jsx')
-rw-r--r-- | src/SalaryInput.jsx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/SalaryInput.jsx b/src/SalaryInput.jsx new file mode 100644 index 0000000..f04c68f --- /dev/null +++ b/src/SalaryInput.jsx @@ -0,0 +1,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; |