diff --git a/src/App.tsx b/src/App.tsx index 556be10..f6fffe7 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,6 +1,7 @@ import React from "react"; import Dashboard from "./Routes/Dashboard/Dashboard"; import Header from "./Components/Header/Header"; +import Container from "./Components/Container/Container"; import { createBrowserRouter, RouterProvider } from "react-router-dom"; import Store from "./Plugins/Redux/Store/Store"; import { Provider } from "react-redux"; @@ -17,7 +18,9 @@ export default function App() {
- + + + ); diff --git a/src/components/Container/Container.tsx b/src/components/Container/Container.tsx new file mode 100644 index 0000000..942785a --- /dev/null +++ b/src/components/Container/Container.tsx @@ -0,0 +1,21 @@ +import React from "react"; +import Sidebar from "../Sidebar/Sidebar"; + +export interface props { + children: React.ReactNode; +} + +export default function Container(props: props) { + return ( +
+
+
+ {props.children} +
+
+ +
+
+
+ ); +} diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx index 266809c..d91ad75 100644 --- a/src/components/Header/Header.tsx +++ b/src/components/Header/Header.tsx @@ -5,7 +5,7 @@ import styles from "../../styles"; export default function Header() { return ( -
+

Ivy

diff --git a/src/components/Login/Login.tsx b/src/components/Login/Login.tsx index eaf7cb1..213121e 100644 --- a/src/components/Login/Login.tsx +++ b/src/components/Login/Login.tsx @@ -33,14 +33,7 @@ export default function Login() { onClick={login} value="Login" variant="contained" - style={{ - backgroundColor: "#9e8500", - width: 128, - height: 32, - border: "none", - padding: 8, - borderRadius: 16, - }} + style={styles.login_button} >

Login

diff --git a/src/components/Sidebar/Sidebar.tsx b/src/components/Sidebar/Sidebar.tsx new file mode 100644 index 0000000..767590c --- /dev/null +++ b/src/components/Sidebar/Sidebar.tsx @@ -0,0 +1,20 @@ +import React from "react"; +import styles from "../../styles"; +import SidebarButton from "../SidebarButton/SidebarButton"; +export interface state { + minimized: { + value: boolean; + sidebar_width: string; + page_width: string; + }; +} +export default function Sidebar() { + return ( +
+ console.log("WIP!")} name="Dashboard" /> + console.log("WIP!")} name="Products" /> + console.log("WIP!")} name="Inventory" /> + console.log("WIP!")} name="Logs" /> +
+ ); +} diff --git a/src/components/SidebarButton/SidebarButton.tsx b/src/components/SidebarButton/SidebarButton.tsx new file mode 100644 index 0000000..76e650b --- /dev/null +++ b/src/components/SidebarButton/SidebarButton.tsx @@ -0,0 +1,21 @@ +import React from "react"; +import { Button } from "@mui/material"; +import styles from "../../styles"; + +export interface props { + name: string; + onClick: any; +} +export default function SidebarButton(props: props) { + return ( +
+ +
+ ); +} diff --git a/src/styles.tsx b/src/styles.tsx index 1c60567..6dec1a1 100644 --- a/src/styles.tsx +++ b/src/styles.tsx @@ -22,12 +22,12 @@ const styles: { [key: string]: React.CSSProperties } = { fontSize: 26, fontWeight: "bold", }, - header_container: { + header_wrapper: { display: "flex", flexDirection: "row", position: "sticky", - backgroundColor: "#3d4848", top: 0, + backgroundColor: "#3d4848", paddingRight: 32, paddingLeft: 32, }, @@ -37,6 +37,7 @@ const styles: { [key: string]: React.CSSProperties } = { width: "50%", justifyContent: "left", alignItems: "center", + paddingLeft: 16, }, header_right: { display: "flex", @@ -45,6 +46,33 @@ const styles: { [key: string]: React.CSSProperties } = { justifyContent: "right", alignItems: "center", }, + login_button: { + backgroundColor: "#9e8500", + width: 128, + height: 32, + border: "none", + padding: 8, + borderRadius: 16, + }, + sidebar_button: { + backgroundColor: "#0b2322", + width: 256, + height: 64, + border: "none", + padding: 8, + borderTopLeftRadius: 32, + borderBottomLeftRadius: 32, + borderTopRightRadius: 0, + borderBottomRightRadius: 0, + }, + sidebar_wrapper: { + display: "flex", + flexDirection: "column", + height: "100vh", + width: "100%", + backgroundColor: "#3d4848", + alignItems: "flex-end", + }, }; export default styles;