From 63633dcd62e72a6c55533b50949630ed8d554328 Mon Sep 17 00:00:00 2001
From: Rosyid Haryadi <rosyid_haryadi@protonmail.com>
Date: Sat, 30 Sep 2023 14:21:44 +0700
Subject: initial commit

---
 src/SalaryInput.jsx | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 src/SalaryInput.jsx

(limited to 'src/SalaryInput.jsx')

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;
-- 
cgit v1.2.3-70-g09d2

