From b2642dee763627b6889aadc4bbfcd201abbdd498 Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Tue, 31 Aug 2021 13:12:47 +0530 Subject: Added half support to add different shipping address --- src/components/Form/Form.scss | 35 ++++++- src/components/Form/People/RegisterPersonForm.tsx | 121 ++++++++++++++++++---- 2 files changed, 128 insertions(+), 28 deletions(-) (limited to 'src/components/Form') diff --git a/src/components/Form/Form.scss b/src/components/Form/Form.scss index 31a15b1..381f45c 100644 --- a/src/components/Form/Form.scss +++ b/src/components/Form/Form.scss @@ -24,12 +24,23 @@ input[type=number] { padding: 1.5rem; box-sizing: border-box; border: 1px solid $border1; + background-color: $background4; display: flex; flex-direction: column; - justify-content: space-around; + justify-content: space-between; - background-color: $background4; + .inputs { + display: flex; + flex-direction: column; + justify-content: space-around; + height: 100%; + } + + h3 { + padding: 0; + margin: 0; + } } @mixin formWideLabel { @@ -121,13 +132,27 @@ input { .floatingForm .menu { position: absolute; - right: 0.5rem; bottom: 0.5rem; + + * { + margin: 1rem; + } } -.floatingForm .menu * { - margin: 1rem; +.floatingForm .options { + position: absolute; + bottom: 1.5rem; + left: 1.5rem; + + label { + display: flex; + align-items: center; + justify-content: left; + font-size: $fontSize1; + border: none; + padding: 0; + } } .DocumentInfoForm { diff --git a/src/components/Form/People/RegisterPersonForm.tsx b/src/components/Form/People/RegisterPersonForm.tsx index dedc45a..3fc8b32 100644 --- a/src/components/Form/People/RegisterPersonForm.tsx +++ b/src/components/Form/People/RegisterPersonForm.tsx @@ -21,12 +21,15 @@ const RegisterPersonForm: React.FC = (props) => { const [newPersonPhone, setNewPersonPhone] = useState(""); const [newPersonEmail, setNewPersonEmail] = useState(""); + const [shipToBillAddress, setShipToBillAddress] = useState(true); + const [newPersonBillAddressLine, setNewPersonBillAddressLine] = useState(""); const [newPersonBillCity, setNewPersonBillCity] = useState(""); const [newPersonBillState, setNewPersonBillState] = useState(""); const [newPersonBillPINCode, setNewPersonBillPINCode] = useState(""); const [newPersonBillCountry, setNewPersonBillCountry] = useState(""); + const hideSelf = () => props.setVisibility(false); const closeOnBGClicked = (event: any) => @@ -80,29 +83,32 @@ const RegisterPersonForm: React.FC = (props) => {
- - - - - +

Client Details

+
+ + + + + +
@@ -149,6 +155,75 @@ const RegisterPersonForm: React.FC = (props) => {
+ {shipToBillAddress || // TODO: Make it store different data + // TODO: maybe move it to its own prop +
+

Shipping Address

+ + + + + + + + + + +
+ } + +
+ + + +
+
hideSelf()} /> -- cgit v1.2.3