From 6c69cd438a2ef0befdb9c4ca68c65df715ef2c5c Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Fri, 17 Feb 2023 19:20:39 +0800 Subject: [PATCH] Added some design for the dashboard --- src/components/ColoredCube/ColoredCube.tsx | 20 ++++++++++ .../DashboardContainer/DashboardContainer.tsx | 29 ++++++++++++++ src/components/Icons/StatsIcon/StatsIcon.tsx | 30 +++++++++++++++ .../TotalProductsIcon/TotalProductsIcon.tsx | 35 +++++++++++++++++ src/routes/Dashboard/Dashboard.tsx | 38 +++++++++++++++++-- src/styles.tsx | 32 +++++++++++++++- 6 files changed, 179 insertions(+), 5 deletions(-) create mode 100644 src/components/ColoredCube/ColoredCube.tsx create mode 100644 src/components/DashboardContainer/DashboardContainer.tsx create mode 100644 src/components/Icons/StatsIcon/StatsIcon.tsx create mode 100644 src/components/Icons/TotalProductsIcon/TotalProductsIcon.tsx diff --git a/src/components/ColoredCube/ColoredCube.tsx b/src/components/ColoredCube/ColoredCube.tsx new file mode 100644 index 0000000..4fe7715 --- /dev/null +++ b/src/components/ColoredCube/ColoredCube.tsx @@ -0,0 +1,20 @@ +import { PropaneSharp } from "@mui/icons-material"; +import React from "react"; + +export interface props { + color: string; + size: number; +} +export default function ColoredCube(props: props) { + return ( +
+
+
+ ); +} diff --git a/src/components/DashboardContainer/DashboardContainer.tsx b/src/components/DashboardContainer/DashboardContainer.tsx new file mode 100644 index 0000000..0dfe259 --- /dev/null +++ b/src/components/DashboardContainer/DashboardContainer.tsx @@ -0,0 +1,29 @@ +import React from "react"; + +export interface props { + children: React.ReactNode; + width: string; + height: string; +} + +export default function DashboardContainer(props: props) { + return ( +
+ {props.children} +
+ ); +} diff --git a/src/components/Icons/StatsIcon/StatsIcon.tsx b/src/components/Icons/StatsIcon/StatsIcon.tsx new file mode 100644 index 0000000..a0b1e56 --- /dev/null +++ b/src/components/Icons/StatsIcon/StatsIcon.tsx @@ -0,0 +1,30 @@ +import React from "react"; + +export interface props { + size: number; + color: string; +} +export default function StatsIcon(props: props) { + return ( +
+ + + + + + + +
+ ); +} diff --git a/src/components/Icons/TotalProductsIcon/TotalProductsIcon.tsx b/src/components/Icons/TotalProductsIcon/TotalProductsIcon.tsx new file mode 100644 index 0000000..3b2a802 --- /dev/null +++ b/src/components/Icons/TotalProductsIcon/TotalProductsIcon.tsx @@ -0,0 +1,35 @@ +import React from "react"; + +export interface props { + size: number; + color: string; +} +export default function TotalProductsIcon(props: props) { + return ( +
+ + + + + + + + + + + + +
+ ); +} diff --git a/src/routes/Dashboard/Dashboard.tsx b/src/routes/Dashboard/Dashboard.tsx index 986e073..dd78185 100644 --- a/src/routes/Dashboard/Dashboard.tsx +++ b/src/routes/Dashboard/Dashboard.tsx @@ -1,14 +1,44 @@ import React from "react"; -import AppLogo from "../../Components/Icons/AppLogo/AppLogo"; +import TotalProductsIcon from "../../Components/Icons/TotalProductsIcon/TotalProductsIcon"; +import DashboardContainer from "../../Components/DashboardContainer/DashboardContainer"; +import StatsIcon from "../../Components/Icons/StatsIcon/StatsIcon"; import "../../index.css"; import styles from "../../styles"; +import HomeIcon from "../../Components/Icons/HomeIcon/HomeIcon"; +import ColoredCube from "../../Components/ColoredCube/ColoredCube"; export default function Dashboard() { return (
- -

Ivy - Inventory Manager

-

Welcome to the Dashboard

+
+ +

Dashboard

+
+ +
+ +

Total Products

+
+

2546 Unique Items

+

In inventory

+
+
+ +
+ +

Current Session

+
+
+ +

Added

+
+

254

+
+ +

Removed

+
+

64

+
); } diff --git a/src/styles.tsx b/src/styles.tsx index 23c0bc0..c61cd05 100644 --- a/src/styles.tsx +++ b/src/styles.tsx @@ -13,13 +13,32 @@ const styles: { [key: string]: React.CSSProperties } = { flex: 1, height: "100%", alignItems: "center", - paddingTop: 32, + paddingTop: 0, + paddingLeft: 16, }, text: { fontSize: 16, color: "white", fontWeight: "bold", }, + text_medium: { + fontSize: 26, + color: "white", + fontWeight: "bold", + }, + text_large: { + fontSize: 36, + color: "white", + fontWeight: "bold", + }, + text_dashboard_1: { + fontSize: 46, + color: "white", + }, + text_dashboard_2: { + fontSize: 56, + color: "white", + }, logo_title: { color: "#6c9575", fontSize: 26, @@ -90,6 +109,17 @@ const styles: { [key: string]: React.CSSProperties } = { backgroundColor: "#3d4848", alignItems: "flex-end", }, + wrapper_row: { + display: "flex", + flexDirection: "row", + alignItems: "center", + }, + wrapper_column: { + display: "flex", + flexDirection: "column", + alignItems: "center", + height: "50%", + }, }; export default styles;