import PropTypes from "prop-types"; import { useTheme } from "@emotion/react"; import { Box, Stack, Typography } from "@mui/material"; import Arrow from "../../../../../assets/icons/top-right-arrow.svg?react"; import Background from "../../../../../assets/Images/background-grid.svg?react"; import ClockSnooze from "../../../../../assets/icons/clock-snooze.svg?react"; const StatusBox = ({ title, value, status }) => { const theme = useTheme(); let sharedStyles = { position: "absolute", right: 8, opacity: 0.5, "& svg path": { stroke: theme.palette.primary.contrastTextTertiary }, }; let color; let icon; if (status === "up") { color = theme.palette.success.lowContrast; icon = ( ); } else if (status === "down") { color = theme.palette.error.lowContrast; icon = ( ); } else if (status === "paused") { color = theme.palette.warning.lowContrast; icon = ( ); } return ( {title} {icon} {value} # ); }; StatusBox.propTypes = { title: PropTypes.string, value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired, status: PropTypes.string, }; export default StatusBox;