import { Stack, Typography } from "@mui/material"; import PropTypes from "prop-types"; import { useTheme } from "@emotion/react"; import SkeletonLayout from "./skeleton"; const MonitorCountHeader = ({ isLoading = false, monitorCount, heading = "monitors", sx, children, }) => { const theme = useTheme(); if (isLoading) return ; if (monitorCount === 1) { heading = "monitor"; } return ( {monitorCount} {heading} {children} ); }; MonitorCountHeader.propTypes = { isLoading: PropTypes.bool, monitorCount: PropTypes.number, heading: PropTypes.string, children: PropTypes.node, sx: PropTypes.object, }; export default MonitorCountHeader;