aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-08-29 10:46:06 +0530
committerMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-08-29 10:46:06 +0530
commit20b48b0003f198ef51eb982735526011f59c511d (patch)
treed05ee38c6b0b137e3a3eabeb0d101000d9acd2f4 /src/components
parent12fa58555681257384150383b4e83c572d19fec9 (diff)
styled SubmitButton and making it disappear when invalid
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Display/Display.scss8
-rw-r--r--src/components/Display/SummaryDisplay.tsx8
-rw-r--r--src/components/Pages/BillingPage.scss20
-rw-r--r--src/components/Pages/BillingPage.tsx1
4 files changed, 34 insertions, 3 deletions
diff --git a/src/components/Display/Display.scss b/src/components/Display/Display.scss
index 8be6c4e..214cb18 100644
--- a/src/components/Display/Display.scss
+++ b/src/components/Display/Display.scss
@@ -58,10 +58,18 @@
}
.SummaryDisplay {
+ position: relative;
width: 30%;
padding: 0.5rem 2rem;
}
+.SummaryDisplay .SubmitButton {
+ position: absolute;
+ bottom: 1rem;
+ right: 1rem;
+ padding: 0.3rem;
+}
+
.SummaryDisplay h1 {
font-size: 3rem;
margin: 0.5rem -1.5rem;
diff --git a/src/components/Display/SummaryDisplay.tsx b/src/components/Display/SummaryDisplay.tsx
index 5d1589e..37ba077 100644
--- a/src/components/Display/SummaryDisplay.tsx
+++ b/src/components/Display/SummaryDisplay.tsx
@@ -92,9 +92,11 @@ const SummaryDisplay: React.FC<props> = (props) => {
</tbody>
</table>
- <button onClick={() => props.setShowSubmitMenu(true)}>
- Submit
- </button>
+ {props.items.length > 0 &&
+ <button className={"SubmitButton"} onClick={() => props.setShowSubmitMenu(true)}>
+ Submit (experimental)
+ </button>
+ }
</div>
);
}
diff --git a/src/components/Pages/BillingPage.scss b/src/components/Pages/BillingPage.scss
new file mode 100644
index 0000000..f359df1
--- /dev/null
+++ b/src/components/Pages/BillingPage.scss
@@ -0,0 +1,20 @@
+@import "./../../styles/theme";
+
+.BillingPageFlex div {
+ box-sizing: border-box;
+ border: 1px solid $border1;
+}
+
+.BillingPageFlex {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ height: 27rem;
+}
+
+@media only screen and (max-device-width: 480px) {
+ .BillingPageFlex {
+ flex-direction: column;
+ height: 35rem;
+ }
+}
diff --git a/src/components/Pages/BillingPage.tsx b/src/components/Pages/BillingPage.tsx
index c1d30a5..e065cbc 100644
--- a/src/components/Pages/BillingPage.tsx
+++ b/src/components/Pages/BillingPage.tsx
@@ -7,6 +7,7 @@
*/
import React, { useState, useEffect } from "react";
+import "./BillingPage.scss";
import { Item, Person, Transport/*, Invoice*/ } from "../../interfaces";
import axios from "axios";