From 82cbb902027fd69c87704af8df3a07ff6d8615e5 Mon Sep 17 00:00:00 2001 From: Daniel Cojocea Date: Fri, 30 Aug 2024 14:11:48 -0400 Subject: [PATCH] Added dark mode fallback placeholder skeleton --- Client/src/Components/Fallback/index.jsx | 11 ++++-- Client/src/Components/Inputs/Select/index.jsx | 1 + Client/src/Pages/Monitors/Configure/index.jsx | 8 +---- .../assets/Images/create-placeholder-dark.svg | 36 +++++++++++++++++++ 4 files changed, 47 insertions(+), 9 deletions(-) create mode 100644 Client/src/assets/Images/create-placeholder-dark.svg diff --git a/Client/src/Components/Fallback/index.jsx b/Client/src/Components/Fallback/index.jsx index 22ac837b0..26d818bdf 100644 --- a/Client/src/Components/Fallback/index.jsx +++ b/Client/src/Components/Fallback/index.jsx @@ -2,10 +2,12 @@ import PropTypes from "prop-types"; import { useTheme } from "@emotion/react"; import { Box, Stack, Typography } from "@mui/material"; import Skeleton from "../../assets/Images/create-placeholder.svg?react"; +import SkeletonDark from "../../assets/Images/create-placeholder-dark.svg?react"; import Background from "../../assets/Images/background-grid.svg?react"; import Button from "../Button"; import Check from "../Check/Check"; import { useNavigate } from "react-router-dom"; +import { useSelector } from "react-redux"; import "./index.css"; /** @@ -22,6 +24,7 @@ import "./index.css"; const Fallback = ({ title, checks, link = "/", isAdmin }) => { const theme = useTheme(); const navigate = useNavigate(); + const mode = useSelector((state) => state.ui.mode); return ( { alignItems="center" gap={theme.spacing(20)} > - + {mode === "light" ? ( + + ) : ( + + )} { A {title} is used to: diff --git a/Client/src/Components/Inputs/Select/index.jsx b/Client/src/Components/Inputs/Select/index.jsx index b7146f27a..e30b5d951 100644 --- a/Client/src/Components/Inputs/Select/index.jsx +++ b/Client/src/Components/Inputs/Select/index.jsx @@ -67,6 +67,7 @@ const Select = ({ component="h3" color={theme.palette.text.secondary} fontWeight={500} + fontSize={13} > {label} diff --git a/Client/src/Pages/Monitors/Configure/index.jsx b/Client/src/Pages/Monitors/Configure/index.jsx index 9a90c5512..61d7d155c 100644 --- a/Client/src/Pages/Monitors/Configure/index.jsx +++ b/Client/src/Pages/Monitors/Configure/index.jsx @@ -252,16 +252,11 @@ const Configure = () => { isLoading={isLoading} level="tertiary" label={monitor?.isActive ? "Pause" : "Resume"} - animate="rotate180" img={} sx={{ backgroundColor: theme.palette.background.main, - pl: theme.spacing(4), - pr: theme.spacing(6), + px: theme.spacing(6), mr: theme.spacing(6), - "& svg": { - mr: theme.spacing(2), - }, }} onClick={handlePause} /> @@ -270,7 +265,6 @@ const Configure = () => { level="error" label="Remove" sx={{ - boxShadow: "none", px: theme.spacing(8), }} onClick={() => setIsOpen(true)} diff --git a/Client/src/assets/Images/create-placeholder-dark.svg b/Client/src/assets/Images/create-placeholder-dark.svg new file mode 100644 index 000000000..670da4776 --- /dev/null +++ b/Client/src/assets/Images/create-placeholder-dark.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +