From 92b6da1d37da9232f1f40ac2526b189289049534 Mon Sep 17 00:00:00 2001
From: MikunoNaka <bokuwakanojogahoshii@yahoo.com>
Date: Mon, 13 Sep 2021 17:25:51 +0530
Subject: created new new address component for unlimited addresses

---
 src/components/Form/Address/NewAddressPane.tsx | 69 ++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)
 create mode 100644 src/components/Form/Address/NewAddressPane.tsx

(limited to 'src/components/Form/Address/NewAddressPane.tsx')

diff --git a/src/components/Form/Address/NewAddressPane.tsx b/src/components/Form/Address/NewAddressPane.tsx
new file mode 100644
index 0000000..4dd3788
--- /dev/null
+++ b/src/components/Form/Address/NewAddressPane.tsx
@@ -0,0 +1,69 @@
+/*
+ * OpenBills - Self hosted browser app to generate and keep track of simple invoices
+ * Version - 0
+ * Licensed under the MIT license - https://opensource.org/licenses/MIT
+ *
+ * Copyright (c) 2021 Vidhu Kant Sharma
+*/
+
+import React, { Dispatch, SetStateAction, useState } from "react";
+import "./../Form.scss";
+import { Address } from "./../../../Interfaces/interfaces"
+
+interface Props {
+  heading: string
+  address: Address
+  setAddress: Dispatch<SetStateAction<Address>>
+}
+
+const NewAddressPane: React.FC<Props> = (props) => {
+  const address = props.address;
+
+return (
+  <div className={"widePane formPane"}>
+    <h3>{props.heading}</h3>
+
+    <label>
+      Address: <input className={"wideInputBox"} 
+        type="text" value={address.AddressLine} onChange={
+          ({target: {value}}) => props.setAddress({...address, AddressLine: value})
+        }
+      required />
+    </label>
+
+    <label>
+      City: <input className={"wideInputBox"} 
+        type="text" value={address.City} onChange={
+          ({target: {value}}) => props.setAddress({...address, City: value})
+        }
+      required />
+    </label>
+
+    <label>
+      State: <input className={"wideInputBox"} 
+        type="text" value={address.State} onChange={
+          ({target: {value}}) => props.setAddress({...address, State: value})
+        }
+      required />
+    </label>
+
+    <label>
+      PIN Code: <input className={"wideInputBox"} 
+        type="text" value={address.PINCode} onChange={
+          ({target: {value}}) => props.setAddress({...address, PINCode: value})
+        }
+      required />
+    </label>
+
+    <label>
+      Country: <input className={"wideInputBox"} 
+        type="text" value={address.Country} onChange={
+          ({target: {value}}) => props.setAddress({...address, Country: value})
+        }
+      required />
+    </label>
+  </div>
+  );
+}
+
+export default NewAddressPane;
-- 
cgit v1.2.3

