From b275c2a9f0a98cf5f70280b238259b8280439f13 Mon Sep 17 00:00:00 2001 From: keannu125 Date: Tue, 21 Feb 2023 14:04:36 +0800 Subject: [PATCH] Overhauled Dashboard flex layout to be cleaner --- src/routes/Dashboard/Dashboard.tsx | 80 ++++++++++++++---------------- src/styles.tsx | 60 +++++++++++----------- 2 files changed, 68 insertions(+), 72 deletions(-) diff --git a/src/routes/Dashboard/Dashboard.tsx b/src/routes/Dashboard/Dashboard.tsx index 3127229..4737efb 100644 --- a/src/routes/Dashboard/Dashboard.tsx +++ b/src/routes/Dashboard/Dashboard.tsx @@ -12,70 +12,62 @@ import RecentlyAddedIcon from "../../Components/Icons/RecentlyAddedIcon/Recently export default function Dashboard() { return ( -
-
+
+

Dashboard

-
+
-
-
-
- -
- -

Total Products

-
-

2546 Unique Items

-

In inventory

-
+
+
+
+ +

Total Products

+

2546 Unique Items

+

In inventory

-
-
- -
- -

Current Session

-
-
- -

Added

-
-

254

-
- -

Removed

-
-

64

-
+
+
+
+ +

Current Session

+
+
+ +

Added

+
+

254

+
+ +

Removed

{" "} +
-
- -
+
+
+

Low Stock

Canned Pagmamahal

In Stock: 3

- -
- -
+
+
+

Recently Added

Zidane's Water

Added 02/17/2023

- +
- -
+
+

Recent

@@ -98,14 +90,14 @@ export default function Dashboard() {

Removed: 64

02/17/2023

-
+

Canned

Pagmamahal

Added: 0

Removed: 60

02/17/2023

- +
diff --git a/src/styles.tsx b/src/styles.tsx index 749b9c2..57931d9 100644 --- a/src/styles.tsx +++ b/src/styles.tsx @@ -109,39 +109,43 @@ const styles: { [key: string]: React.CSSProperties } = { borderBottomRightRadius: 0, justifyContent: "left", }, + widget: { + display: "flex", + flexDirection: "column", + backgroundColor: "#1d3b33", + borderRadius: 8, + paddingLeft: 16, + paddingRight: 16, + paddingBottom: 32, + margin: 8, + lineHeight: 0.5, + }, + content_row: { + display: "flex", + flexDirection: "row", + alignItems: "center", + }, + content_column: { + display: "flex", + flexDirection: "column", + lineHeight: 0, + }, + flex_row: { + display: "flex", + flexDirection: "row", + alignItems: "stretch", + }, + flex_column: { + display: "flex", + flexDirection: "column", + }, sidebar_wrapper: { display: "flex", flexDirection: "column", height: "100vh", - width: "110%", - backgroundColor: "#3d4848", - alignItems: "flex-end", - }, - wrapper_row: { - display: "flex", - flexDirection: "row", - alignItems: "center", - alignSelf: "flex-start", - }, - wrapper_column: { - display: "flex", - flexDirection: "column", - alignSelf: "flex-start", - justifyContent: "left", - lineHeight: 0, - }, - DashboardWidget_WrapperColumn: { - justifyContent: "center", - display: "flex", - flexDirection: "column", width: "100%", - height: "100vh", - }, - DashboardWidget_WrapperRow: { - justifyContent: "center", - display: "flex", - flexDirection: "row", - width: "95%", + paddingLeft: "2vh", + backgroundColor: "#3d4848", }, };